“In the name of Allah, most gracious and most merciful"
“Indeed, Allah will not change the condition of a people until they change what is in themselves.” (Al-Quran 13:11)
Allah has a beautiful plan for every woman and man. Trust Allah and pray and He will light the way. (Wael Abdelgawad)
Programming Fundamentals (Spring 2013) Assignment No. 5
Deadline: 06/05/2013 11:45PM
Design following programs in Visual C++: Question # 1
Write a program that dynamically allocates an array large enough to hold a user-defined number of test scores. Once all the scores are entered, a function should be called that sorts the array in ascending order. Another function should be called that calculates the average score. The program should display the sorted list of scores and averages with appropriate headings.
Question # 2
Artistic Solutions, a painting company, has determined that for every 160 square feet of wall space, one gallon of paint and three hours of labor are required. The company charges $28.00 per hour for labor. Design a modular program that allows the user to
enter the number of rooms that are to be painted, the approximate square feet of wall space in each room (it may differ from room to room), and the price of the paint per gallon. It should then create a report that displays the following information: • The number of gallons of paint required (rounded up to the next full gallon). • The hours of labor required. • The labor charges. • The total cost of the paint job.
Question # 3
Write a program that computes and displays the charges for a patient’s hospital stay. First, the program should ask if the patient was admitted as an in-patient or an outpatient. If the patient was an in-patient the following data should be entered: • The number of days spent in the hospital • The daily rate • Charges for hospital services (lab tests, etc.) • Hospital medication charges. If the patient was an out-patient the following data should be...
Please join StudyMode to read the full document