0

Can someone please help me with this question?

So this question was given to do by my lecturer, to be completed in class and fail to do so. I've been trying to complete it on my free at home and i know how to do all , but i can't get pass 2A. Please keep on mind I'm not trying to use this site to do my homework or anything like that. i just want to know what i have to do in order to get pass 2 A, I'm sure it's probably a common mistake. And if you decide to try doing this i would prefer you do it in c or C++, thank you. Marundi Rental Agency have three classes of vehicle at the rate given below. 1. Using the for ... do construct, create an algorithm to accept as input the rentals below Customer | Vehicle Class | # of days rented ______________________________________ Jacob, J | A | 5 Clarke, G | C | 4 Jupitor, M | B | 1 Darley, T | B | 4 Hobson, F | A | 2 Sadar, Y | B | 1 2. Given the following standard rates, for each customers, calculate and output: A. The cost of rental B. A service charge of 3% of rental C. Total to be paid by customer D. The overall total of rentals paid to the E. The average of all service charge paid Class | Daily Rate ________________ A | 8000 B | 6900 C | 5400

11th Mar 2017, 2:37 AM
Ranaldo
Ranaldo - avatar
1 Antwort
+ 1
i can give you a hint, easiest way imo is create a class with the objects having the required variables, create class methods to crunch the math, instantiate the objects and put them in an array, and run them thru the loop. if you don't have the option to use objects like that yet (sounds like an earlier question in the curriculum), the best way would be multi dimensional arrays with nested for loops
11th Mar 2017, 3:48 AM
William La Flamme
William La Flamme - avatar