Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

WAP to create a class which stores a dynamic integer array and its size. Include all

the constructors and destructor in the class. Store two arrays of different size in

two objects. Join the two arrays and and store it in another object using a member

function.


Develop a program and algorithm to find the roots of the quadratic equation using bisection method.


Given a string on one line, a second string on a second line, and an integer index, insert the contents of the second string in the first string at the index specified. Then, output the result.

Ex: If the input is:

FuzzyBear

Wuzzy

5

the output is:

FuzzyWuzzyBear

Note: Using a pre-defined string function, the solution can be just one line of code.


#include <iostream>

#include <string>

using namespace std;


int main() {

string workStr;

string otherStr;

int strPos;


getline(cin, workStr);

getline(cin, otherStr);

cin >> strPos;


cout << workStr << endl;

return 0;

}


Create a pseudocode that will input values for A and B. Compare two values inputted and print which of the values is higher including the remark “Higher”.  


Fibonacci numbers are a sequence of integers, starting with 1, where the value of each number is the sum of the two previous numbers, e.g. 1, 1, 2, 3, 5, 8, etc. Write a function called fibonacci that takes a parameter, n, which contains an integer value, and have it return the nth Fibonacci number. (There are two ways to do this: one with recursion, and one without.)


rogram 6 – Employee rules Code the following program in Java. There will be many source files.  Most employees work 37.5 hours per week.  Most employees earn R50 000 per year. Managers earn R20 000 extra per year.  Most employees get 15 workdays leaves a year. Managers get an extra 3 days leave per year.  Secretaries must work 40 per week.  Everybody must apply for leave online. Managers also need to get the approval of the CEO of the company when taking leave.  Employees knows how to work. Managers knows how to manage and secretaries knows how to type. Code your classes according to the following class diagram. Name is the only attribute you need.Required 1. : Code the classes Employee, Manager and Secretary. 2. Extra Code an application with a main method. In this class you must code an array o Employee with a maximum size of 20. a. b. c. Add a minimum of 10 objects to the array. You may hard The objects must be a mixture of Employee, Manager and Secretary. Display all the objects on the screen.


In the application class (Program.cs), do the following:

Implement the following methods:

static void addRecipient(RecipientList List)

// Requests the name of the student and adds that student to the List

// You may assume that all students are added as Recipients starting with 90 hours

static void updateHours(RecipientList List)

// Requests the name of the student as well as the number of hours worked

// It then updates the hours left

Implement the main method which does the following:

 Ask the user for the number of recipients’ details that needs to be recorded (you can assume

a valid number between 1 and 10).

 Use a loop to obtain the required details from the user (uses addRecipient()).

 Allows the user to update the number of hours for a single student (uses updateHours())

 Displays all the student details from the list


Write a statement that compares the values of score1 and score2 and takes the following actions. When score1 exceeds score2, the message “player1 wins” is printed to standard out. When score2 exceeds score1, the message “player2 wins” is printed to standard out. In each case, the variables player1Wins, , player1Losses, player2Wins, and player2Losses, , are incremented when appropriate. Finally, in the event of a tie, the message “tie” is printed and the variable tieCount is incremented.


Given the variables x, y, and z, each associated with an int, write a fragment of code that assigns the smallest of these to min.


In the Happy Valley School System, children are classified by age as follows: less than 2, ineligible 2, toddler 3-5, early childhood 6-7, young reader 8-10, elementary 11 and 12, middle 13, impossible 14-16, high school 17-18, scholar greater than 18, ineligible Given an int variable age, write a switch statement that prints out, on a line by itself, the appropriate label from the above list based on age





LATEST TUTORIALS
APPROVED BY CLIENTS