小明喜欢用计算机用英语怎么翻译,帮忙翻译一下计算机专业的最好是ProblemDescriptio 爱问知识人...

Problem Description

You are to redesign a property management database program that allows a real estate agent to view, add, search, an

Problem Description

You are to redesign a property management database program that allows a real estate agent to view, add, search, and save property listings. The program, which you are provided with, was originally written using an array of structures. The system will soon be scaled up, and your boss requires you to rewrite the program, making use of classes.

The program does the following:

On start-up, the program prompts the user for the property listings filename. The file contains the address, suburb and price (in dollars) of each property listed by the agent (see sample file provided: properties.txt). The program reads the address, suburb and price of each property from the file into an array of structures.

Once the relevant details have been read, the program displays a menu and prompts the user for their selection – to display properties, search for those <= to a price, add a new property or save the file.

Note: The code provided works well and has been well-formatted, but is intentionally not well-commented. You must add appropriate comments to any of this code you re-use (and any of your own code).

Your Task:

1. Design a Property class. Review the functionality of the original program to determine which parts should be recoded as member functions of the Property class. The class declaration needs to be stored in Property.h, and the member function definitions (implementation) in Property.cpp.

2. Add a date listed to the property information, using a new class, Date. The Property class will contain an instance of the Date class (composition) for the date it was listed.

Use Date.h and Date.cpp for the header and implementation files respectively.

A new data file containing properties with dates is provided (newprops.txt).

3. Write a program PropertyTest.cpp that performs unit tests on the Property class to verify that it works correctly. The file needs to be commented to explain what each unit test is trying to verify.

4. Rewrite the property database program so that it makes use of the Property class.

5. Add functionality to the program (menu item 5, exit becomes 6) so that you can search for all properties listed on or after a date entered by the user.

展开

全部

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值