FontysICT-sem1

Training Car Day Value

Level 2 of 5
Learning Objectives Class, property.
Prior knowledge required Basic knowledge about objects.
Challenge Type Realize.

You have been hired as a software engineer to program a tool to determine the daily value of cars. This daily value may be calculated in this Challenge using the formula

(500000/mileage) * factor

but especially look on the Internet for the real calculation: maybe you’ll come up with something more realistic. The factor is a value that depends on the fuel type:

Technical Design

Create a Console app or a GUI app (your own choice). Create a List with at least 4 cars. At startup, the app shows the information of each car (use ToString()).

Then let each car drive a random number of miles between 1000 and 20000. For each car, show the information again. Repeat several times until each car has driven at least 100000 kilometers.