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

write nested loops to produce the following output


*******

  • * *
  • * *
  • ******* *
  • * *
  • * *
  • ******* *
  • * *
  • * *
  • **************************

Hope Michael, a DBIT 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. 

ii. Declare a function that takes an array of Hope’s scores as a parameter and calculates both

the total and the mean score. 

iii. Pass the mean score from (ii) above into another function by reference, that computes whether Hope has passed or not given that a pass is 50 – 100 while a fail is 0 – 49.99 Marks.

iv. Display Hope’s results as follows: (this is a sample output, use arbitrary values in your

solution)

Student Name: Hope Michael

Test Scores:

Total Marks:

Mean Score:

Exams Verdict: Pass

40, 50, 60, 80, 98, 82, 70, 32


Company ABC in Kenya pays its employees based on a commission of the sales they make as illustrated in the table below:

    Monthly Sales

Next 100,000

Above 350,000

Commission Rate

15%

25%

    First 50,000

10%

     Next 200,000

20%

    Additionally, all employees are entitled to a basic commission of 20,000 per month.

a. Draw a flowchart that allows a HR employee to input an employee’s monthly sales, computes the commission due to the employee and displays it to the HR employee.


b. Write a C++ program implementation of the flowchart above. 


Create a program that will make ask the user to input an integer then display the equivalent day of the week. 1 is Sunday, 2 is Monday and so on. If the inputted number is not within 1-7m output is ''Day is not available!''.


Use nested While loops to produce the following pattern:



! ! ! ! ! ! ! ! ! ! ! !


\ \ ! ! ! ! ! ! ! ! / /


\ \ \ \ ! ! ! ! / / / /


\ \ \ \ \ ! ! / / / / /

Write nested for c++ loops to produce the following output.




×××× / / / / / / / / ××××


××× / / / / / / \ \ ×××


×× / / / / \ \ \ \ ××


× / / \ \ \ \ \ \ ×


\ \ \ \ \ \ \ \

Write nested for c++ loops to produce the following output.



×××× / / / / / / / / ××××


××× / / / / / / \ \ ×××


×× / / / / \ \ \ \ ××


× / / \ \ \ \ \ \ ×


\ \ \ \ \ \ \ \

In the Virtual Circuit (VC) Subnet (refer the course material “Session 20 Network Layer Functionalities” in Moodle) every circuit will have a VC ID and the routing table includes the VC IDs to manage the circuits. But, the problem with VC ID is it is local to the system; VC IDs are assigned by the host system itself without the knowledge of VC IDs assigned by the other hosts. Because of which there will be a clash of VC IDs at the router. Understanding the ambiguity, the router then changes one of the VC IDs to a unique ID at router level and proceeds with data transfer (refer Slide No. 12 of the course material). Over and above the data transfer, this is the additional responsibility for a router which creates hiccups in the data communication. Question: Design a network system where VC IDs will be assigned uniquely which avoids VC ID collision at routers. Since such a system avoids the VC ID collision at the router, it should definitely save router's time and should improve performance of router.


There is only one kind of manager in the EMPMULT program in this chapter. Any serious

company has executives as well as managers. From the manager class derive a class

called executive. (We’ll assume an executive is a high-end kind of manager.) The additional data in the executive class will be the size of the employee’s yearly bonus and the

number of shares of company stock held in his or her stock-option plan. Add the appropriate

member functions so these data items can be input and displayed along with the other

manager data.


Create and Implement a C++ program to overload ++ operators for the class Time.

 Data members should be hour, minute and seconds.

 Set data members as zero in default constructor.

 Take one object in main to set 23:24:59 hrs.

 Display time in the given format 23:24:59 hrs.

 Overload ++ operator to make a stop watch. (i.e. that will increment seconds by 1 each

time its called)

 Make a function by name add_time() to increment seconds.

 Write a driver program to test your class.


LATEST TUTORIALS
APPROVED BY CLIENTS