Posted: March 3rd, 2014

Implement an abstract data type usedCars with private attributes year(integer), make(string), model(string), miles(integer) and price(float), and public operations to set the values and get the values.

 

Assignment:

Implement an abstract data type usedCars with private attributes year(integer), make(string), model(string), miles(integer) and price(float), and public operations to set the values and get the values.    Write a main program to read the data from the file “car.txt” Select all the cars that are less than $25,000.  Print them in ascending order according to price, when there is a tie, the newer car appears first.

NOTE:

 

THERE SHOULD BE NO cin OR cout INSIDE THE CLASS.

 

Input

The input contains many lines, with one line per car.  The first field of a line is the year, followed by the make, model, and price in that order.  The fields are separated by at least one blank.  The make and model of the car are composed of one word each, with no space allowed, the prices have a $ prefix.  For example, the input file could look like

2001 Ford F-150  $799

2013 BMW X3  $6900

 

2007 Pontiac TA  $21000

 

Expert paper writers are just a few clicks away

Place an order in 3 easy steps. Takes less than 5 mins.

Calculate the price of your order

You will get a personal manager and a discount.
We'll send you the first draft for approval by at
Total price:
$0.00
Live Chat+1-631-333-0101EmailWhatsApp