CMIS 242 PROJECT 4 MANAGE A REAL ESTATE DATABASE: The fourth programming project involves writing a program to manage a real estate database. This program should be comprised of an enumerated type, an interface and two classes. The enumerated type should be named Status and should contain three enumeration literals, FOR_SALE, UNDER_CONTRACT and SOLD.
The interface should be a generic interface named StateChangeable and it should have a bounded generic type parameter whose type must be an enumerated type. It should contain one abstract method changeState that has a parameter whose type of the generic type parameter.
CMIS 242 PROJECT 4 MANAGE A REAL ESTATE DATABASE:The first of the two classes should be named Property. It should implement the StateChangeable interface. It should contain five instance variables, the property address stored as a string, the number of bedrooms, the square footage and the price, all stored as integers, and the status of the property whose type should be the enumerated type Status. In addition, it should have the following three methods:
CMIS 242 PROJECT 4 MANAGE A REAL ESTATE DATABASE: The second class named Project4 should contain the main method. In addition, it should contain an instance variable that defines the database of property records, which is implemented as a TreeMap, with the transaction number field as the key and a Property object as the value. It should generate the GUI shown below:
CMIS 242 PROJECT 4 MANAGE A REAL ESTATE DATABASE: Clicking the Processbutton should cause the selected choice of the three database actions in the combo box to its right to be executed. It should first check whether any non integer values have been entered in any of the fields that require integers. If so, an error message should be displayed in a JOptionPane window. The operation should be performed when the user clicks the Processbutton. If the user attempts to insert a key that is already in the database an error message should be displayed using a JOptionPane message dialog box. If the user attempts to delete or find a record that is not in the database, a message should also be displayed. After each successful operation is completed a JOptionPane window should be displayed confirming the success. In the case of a successful Findrequest, a window should pop up containing all the information in the associated Property object.
CMIS 242 PROJECT 4 MANAGE A REAL ESTATE DATABASE: Clicking the Change Statusbutton should cause status of the property association with the designated transaction number to be changed to status selected in the combo box to its right.
Be sure to follow good programming style, which means making all instance variables private, naming all constants and avoiding the duplication of code. Furthermore you must select enough different kinds of transactions to completely test the program.
Other Related tasks
CMIS242 Entire Course includes:
CMIS242 Project 1 Minimum Maximum and Average,
CMIS242 Project 2 Computes the Sales Tax,
CMIS242 Project 3 Draws Two Types of Shapes,
CMIS242 Project 4 Manage a Real Estate Database,