subject

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 parts. 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 StatusChangeable and it should have a bounded generic type parameter whose type must be an enumerated type. It should contain one abstract method changeStatus that has a parameter whose type of the generic type parameter.

The first part of the program is a class named Property. It should implement the StatusChangeable interface. It should contain five instance variables:

1. The property address stored as a string

2. The number of bedrooms stored as integer

3. The square footage stored as integer

4. The price stored as integer

5. The status of the property whose type should be the enumerated type Status with the equivalent integers of 0, 1, and 2.

In addition, it should have the following three methods:

1. A constructor that accepts four parameters for the purpose of initializing the characteristics of the property, specifically

a. Property address

b. Number of bedrooms

c. Square footage

d. Price

The status of the property should be set to FOR_SALE (0).

2. A method named changeStatus that allows the status of the property to be changed.

3. An overridden toString method that returns a string containing the property address, number of bedrooms, square footage, price, and current status appropriately labeled.

The second part of the program is the Program Core and contains the main method. In addition, it should contain an instance variable that defines the database of property records, which is implemented as a HashMap, with the transaction number field (Integer) as the key and a Property object as the value. For consistency and feedback, there is a PRJ4Property. txt data file to use with this project. For documentation, a Transaction array is declared to hold the actions implemented: insert, deleted, find, and change status.

The data file is read into the program and assigned into a HashMap. As each record is assigned, the program also displays all the records of the data file in the Output Window of the IDE.

The program should generate the GUI shown below:

Clicking the Process button should cause the selected choice of the three actions in the combo box to its right to be executed. When inserting a new record, the program should first check whether any non-integer values have been entered in any of the fields that require integers.

The following error messages should display in a JOptionPane window:

1. When the Process button is clicked, the program checks that there are integers in Transaction No, Bedrooms, Square Footage, and Price fields.

2. If the user attempts to insert a key that is already in the database.

3. If the user attempts to delete or find a record that is not in the database.

After each successful operation is completed a JOptionPane window should display confirming the success. In the case of a successful Find request, a window should pop up containing all the information in the associated Property object.

.

Clicking the Change Status button 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.

For design purposes, it might be helpful to include an Exit button on the GUI Interface.

Each transaction modifies/updates the HashMap holding the data that was read into the program. In addition, each transaction is assigned to the Transaction array.

When the program ends, there are two displays of information. The transactions are displayed in the Output Window of the IDE. After that display the newly modified HashMap of the original set of data is displayed in the Output Window of the IDE.

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 shapes to completely test the program.

Text. file

7623:563 Main St, 4, 2234, 243212, 1

8729:One State Blvd, 7, 4280, 1250000, 0

7321:7865 W. Patrick Dr, 5, 3090, 26000, 2

3242:876 Northwest Way, 3, 1350,175000, 0

9823:76 Inverness Rd, 5, 2890, 398500, 2

2341:45871 Alpine Way, 5, 2850, 385750, 1

8321:44 North Beach Cir, 3, 1750,215250, 0


The fourth programming project involves writing a program to manage a real estate database. This pro
The fourth programming project involves writing a program to manage a real estate database. This pro

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:50
Match the personality traits with their description
Answers: 1
question
Computers and Technology, 22.06.2019 10:30
Aconstruction company is creating a powerpoint presentation describing how they calculate costs during each construction step. they plan to email this presentation to clients. the individual clients will be watching the presentation slide show on their own personal computers. what is the most important formatting step the company should take to make the text readable and pleasing to the eye?
Answers: 2
question
Computers and Technology, 22.06.2019 18:30
Technician a says that a shop towel should never be used to clean around the flange area before replacing an automatic transmission filter. technician b says that a dimpled transmission fluid pan can be repaired. who is right
Answers: 3
question
Computers and Technology, 23.06.2019 02:50
Define a class named movie. include private fields for the title,year, and name of the director. include three public functions withprototypes void movie: : settitle(cstring); , voidmovie: : setyear(int); , void movie: : setdirector(string); . includeanother function that displays all the information about a movie.write a main() function that declares a movie object namedmyfavoritemovie. set and display the object's fields.this is what i have but know its wrong since it will notcompile: #include#includeusing namespace std; //class declarationclass movie{private: string movietitle ; string movieyear; string directorname; public: void settitle(string title); void setyear(string year); void setdirector(string director); void displayinfo(); }; //class implementationvoid movie: : settitle(string title){ movietitle = title; cout< < "what is the title of themovie? "< > temp; myfavoritemovie.settitle(temp); cout< < "enter movie year"< > temp; myfavoritemovie.setyear(temp); cout< < "enter director'sname"< > temp; myfavoritemovie.setdirector(temp); //display all the data myfavoritemovie.displayinfo(); system("pause"); return 0; this code is not entirely mine someone on cramster edited my firstcode but then i try manipulating the new code and i still get acompile error message : \documents\visual studio 2008\projects\movie\movie\movie.cpp(46) : error c2679: binary '< < ' : no operator found which takes aright-hand operand of type 'std: : string' (or there is no acceptableconversion)c: \program files (x86)\microsoft visual studio9.0\vc\include\ostream(653): could be'std: : basic_ostream< _elem,_traits> & std: : operator< < > (std: : basic_ostream< _elem,_traits> & ,const char *)w
Answers: 1
You know the right answer?
The fourth programming project involves writing a program to manage a real estate database. This pro...
Questions
question
Biology, 08.09.2020 23:01
question
Mathematics, 08.09.2020 23:01
Questions on the website: 13722361