Add a new car to the system when it is purchased, noting the purchase price and date of purchase. A new car can only be purchased if there are currently less than 20 cars for sale.
 Sell a car to a customer, noting the sale price and date of sale. The car is ed as sold. Its details are kept in the system for use in sales reports 
 Display a list of all cars for sale sorted by date of purchase.
 Display a sales report showing all car sales. Show the purchase price, sale price. Show the total profit at the end of the report.Reads a list of cars from a text file at start up. The cars are stored in a suitable data structure in memory.
Saves all cars to a text file just before the program exits。
Note, the storage in the text file must be true object persistence. Objects will be read from the file at the program commencement and stored prior to program termination. All operations on objects (cars) must be done in memory.At least one Java class to control the operation of the system.
At least one Java class to store data as objects根据以上信息来写一个report

解决方案 »

  1.   

    根据以上信息来写一个report
      

  2.   

    购买时添加一辆新车,并注意购买价格和购买日期。一辆新车只能购买,如果目前有不到20辆汽车出售。
    卖车给客户,注意的是销售价格和销售日期。这辆车被标记为出售。其细节保持在系统中使用的销售报告
    显示销售按日期购买所有的汽车列表。
    显示销售报告显示所有汽车销售。显示购买价格、销售价格。显示报告结束时的总利润。
    从开始启动的文本文件中读取一个汽车列表。汽车被存储在一个合适的数据结构中。
    在程序退出之前将所有的车都保存到一个文本文件中。
    注意,文本文件中的存储必须是真正的对象持久性。对象将从程序开始前的文件中读取,并在程序终止之前存储。在对象(汽车)上的所有操作必须在内存中完成。
    至少一个java类来控制系统的运行。
    至少一个java类来存储数据对象百度翻译