Questions: 11 448

Answers by our Experts: 10 707

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

Design a class Market to calculate the total expenses. The quantity and price per item are input by the user in base class and the derived class calculate the discount of 10% is offered if the expense is more than 5000 in derived class. Display the total expenses using single inheritance.

Discuss and make summary notes about the following terminologies:

1. stack operations

2. stack applications

3. stack errors

4. queue operations

5. queue applications



Devise the algorithm for the following and verify whether they satisfy all the features.

1.An algorithm that inputs three numbers and outputs them in ascending order.

2.To test whether the three numbers represent the sides of a right angle triangle.

3.To test whether a given point p (x,y) lies on x-axis or y-axis .

4.To compute the area of a circle of a given circumference

5.To locate a specific word in a dictionary



Develop an algorithm in form of a pseudocode to solve the following problem: You are given an array of positive numbers, determine if there are any two integers in the array whose sum is equal to the given value X, and display all pairs of integers in the array that add up to X. Look at the below test case to guide you. (NB: do not write a C++ program but pseudocode) [5 Marks] Array: {7,1,2,8,4,3} Target sum/value (X)= 10 Expected Output: 7 + 3 = 10, 2 + 8 = 10 


Build a class Mobile with the following data members  Model (string)  Brand (string)  Price (float)  simNum(string) 1. Provide a method print setSimNum(string num) that assigns the value num to the attribute simNum 2. Provide a method getNetwork() that returns a string telling which network operator this sim is registered on e.g. Warid, Jazz, Ufone, ,etc. For this you will have to get the first 4 chacters of the simNum and find out the network. E.g. if these 4 characters are 0300 then you will return “Jazz” , if these are 0333 then you will return Ufone and so on. Also provide a method print that prints all details about the mobile 


Use the following array of 8 integers to answer the following questions, {2,3,2,1,2,5,8,2}
a) You are required to write a user defined C++ function that will receive the above array as a
parameter, and will loop through it and re-arrange it into the following final output
{5,3,1,8,2,2,2,2} and display it from the main function of your program. [5 Marks]
The idea is to position all values equal to 2 in the array to come after the other values not
equal to 2. The order of the other values i.e 5,1,3 and 8 does not matter as long as they appear
positioned before all 2s as illustrated in the hint below:
Initial array: {2,3,2,1,2,5,8,2}
NumbertoMove = 2
Final Array: {5,3,1,8,2,2,2,2}
b) Write another separate function in the same program above that takes the array above,
{2,3,2,1,2,5,8,2} as its parameter and loops through the elements calculating the sum
and product of all the elements and displays them.
Hope Michael, a BBIT student did 8 units in an exam and got different marks in each of the exam
papers. She intends to calculate her total, mean score and exams verdict for the exams using a
program written in C++.
Requirements/Guide. (All the instructions below should be done in the same single program)
i. Assign 8 scores to Hope in a one-dimensional array. [2 Marks]
ii. Declare a function that takes an array of Hopeà ƒ ƒ ¢ € ™s scores as a parameter and calculates both
the total and the mean score. [3 Marks]
iii. Pass the mean score from (ii) above into another function by reference using pointers,
that computes whether Hope has passed or not given that a pass is 50 à ƒ ƒ ¢ € “ 100 while a fail is
0 à ƒ ƒ ¢ € “ 49.99 Marks. [3 Marks]
iv. Display Hopeà ƒ ƒ ¢ € ™s results as follows: (this is a sample output, use arbitrary values in your
solution) [2 Marks]
Student Name: Hope Michael
Test Scores: 40, 50, 60, 80, 98, 82, 70, 32
Total Marks: 512
Mean Score: 64
Exams Verdict: Pass
You are an employee of a marketing organization that pays you a monthly salary of Ksh.
10,000 if you work for the recommended 160 hours a month (Monday - Friday, 9am - 5pm,
for a month). This salary can however fluctuate based on the number of hours worked, in that
if you work for more than the recommended working hours ie above 160 hours, you earn an
extra 10% of your salary but if you work for less than 160 hours, you will be deducted 10% of
your salary. With the aid of a SWITCH CASE select structure Implement a program written
in C++ that would help the finance department calculate your monthly salary based on the
hours worked being the input value of the program.

Develop an algorithm in form of a pseudocode to solve the following problem: You are given an array of positive numbers, determine if there are any two integers in the array whose sum is equal to the given value X, and display all pairs of integers in the array that add up to X. Look at the below test case to guide you. (NB: do not write a C++ program but pseudocode) [5 Marks] Array: {7,1,2,8,4,3} Target sum/value (X)= 10 Expected Output: 7 + 3 = 10, 2 + 8 = 10


Class 5A in Sahara Tech Academy has a total of 5 Students. 2 of the students are male while 3 are female. In another stream 5B, in the same school, there are 6 students of which 4 are female and 2 male. Required. Women in Technology International (WITI), an international organization to empower women in technology has organized a symposium for all the female students in class 5 A and B. 1. Using 2D arrays in C++, write a program that registers all the students in both streams in different arrays i.e. 5A and 5B using first name and gender. Traverse through both registers, filter and come up with a full list i.e. 5C that has all the names of the students in 5A and 5B that qualified for the symposium a. Populating and displaying class 5A [2Marks] b. Populating and displaying class 5B [2 Marks] c. Displaying class 5C [5 Marks] 2. Comment important parts of your code. 


LATEST TUTORIALS
APPROVED BY CLIENTS