The Problem: You have a file that contains records of vehicles; your supervisor wants a count of the different vehicles found on the file and the percentage ratio of each.
There is a code on each record that indicates the type of vehicle, the codes are:
A = automobile
T = trucks
B = buses
M = motorcycles
O = other
The output should be a count for each type of vehicle and the percentage of the total. Example: automobiles: 25 14% Trucks 30 15%
I have no idea where to start it. This is all new for me, I just started taking programming classes so please if you could explain it to me step by step instead of just putting up the answer I would appreciate it very much.
I don't know the total number of cars in the records or how many of each different types of vehicles there are in the records. I am very confused. Please help!!