Question: BTM 380 Assignment # 2 In this assignment you are asked to build a simple application to keep track of car inventory. You should build

 BTM 380 Assignment # 2 In this assignment you are asked

BTM 380 Assignment # 2 In this assignment you are asked to build a simple application to keep track of car inventory. You should build a "Car" class with the following private fields: model (string), year (int), color (string), and mileage (double). Provide properties in order to access these fields. Provide a constructor with parameters that can be used to populate all of the fields. Provide GetInfo() method that returns a string consisting of a model, year, color, and mileage, appropriately formatted. Also, provide a "CarDM" (DM stands for data management) class that features two static methods: save(List), and load(). The first one should accept a list of car objects and save their field values to a file called "carlist.txt". The second one should read the "carlist.txt" file and generate (and return) a list of "car" type objects populating their fields with values read from the file. The file should look like follows: carlist.txt - Notepad File Edit Format View Help Accord Blue O 2016 Passat white 20000 2014 As a result of reading this file (as an example), a list of two car objects would be generated: one for Blue Accord, 2016 with 0 mileage; and the second one for White Passat, 2014 with the mileage of 20000. Your main form should look like this: Car Management X Add Car View Cars Save When it loads, the list of car objects should be created by reading from the above file. When Add Car button is clicked the following screen should appear

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Law Questions!