Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Law Of Journalism And Mass Communication

Authors: Susan D. Ross, Amy Reynolds, Robert E. Trager

7th Edition

1544377584, 978-1544377582

More Books

Students also viewed these Law questions