Chapter 17 programming

  • Bids2
  • Budget $1.00
  • Average Bid $135.00
  • Location USA

Posted on

Active
Bid

Project Desciption

  1. Create an Eclipse project named ManageProperties. Create a package named edu.seminolestate.manageproperties. Place the ManageProperties class described below in this package. Create a package named edu.seminolestate.properties. Put all the remaining classes described below in this package.
  2. Make the Property, House, and Apartment classes serializable. Make the Property class comparable.
  3. Create the PropertyZipComparator class. Implement the Comparator interface. Override the compare method using the zip code for the comparison.
  4. Implement the IllegalPropertyArgumentException class. Make this a checked exception. Implement the constructors shown in the UML class diagram.
  5. The following requirements are for the Property class.
    1. Make the Property class abstract. 
    2. Implement the class variables shown in the UML class diagram.
    3. Implement the constructor shown in the UML class diagram. Call the set methods to update the class variables. 
    4. Implement the get and set methods shown in the UML class diagram. The set methods must have the following edits: numeric parameter values must be greater than zero; String parameters values cannot be null or have a length less than one. Throw the IllegalPropertyArgumentException exception if a parameter is invalid. Instantiate the IllegalPropertyArgumentException with a descriptive error message.
    5. Override the compareTo method. Use the value for the comparison.
    6. Override the toString method.
  6. The following requirements are for the House class.
    1. Implement the class variable(s) shown in the UML class diagram.
    2. Implement the constructor shown in the UML class diagram. Call the set methods to update the class variables. 
    3. Implement the get and set methods shown in the UML class diagram. The set methods must have the following edits: numeric parameter values must be greater than zero; String parameters values cannot be null or have a length less than one. Throw the IllegalPropertyArgumentException exception if a parameter is invalid. Instantiate the IllegalPropertyArgumentException with a descriptive error message.
    4. Override the toString method. Call the superclass toString method and then add the values for the Home class.
  7. The following requirements are for the Apartment class.
    1. Implement the class variable(s) shown in the UML class diagram.
    2. Implement the constructor shown in the UML class diagram. Call the set methods to update the class variables. 
    3. Implement the get and set methods shown in the UML class diagram. The set methods must have the following edits: numeric parameter values must be greater than zero; String parameters values cannot be null or have a length less than one. Throw the IllegalPropertyArgumentException exception if a parameter is invalid. Instantiate the IllegalPropertyArgumentException with a descriptive error message.
    4. Override the toString method. Call the superclass toString method and then add the values for the Apartment class.
  8. The following requirements are for the IllegalPropertyArgumentException class.
    1. Implement the constructors shown in the UML class diagram.
  9. The following requirements are for the PropertyZipComparator class.
    1. Implement the Comparator interface for Property objects. Override the compare method. Use the zip code field to compare Property objects.
  10. The following requirements are for the ManageProperties application class.
    1. This class will have the main method. Do NOT throw any exceptions from the main method of this class.
    2. Create an ArrayList to store Property objects.
    3. Display a menu that has choices for: 1 – Add house; 2 – Add apartment; 3 – Delete property; 4 – List all properties by value; 5 – List all properties by zip code; 6 – Exit. Display an error message and repeat the menu if some other value is entered. This will require you to catch the appropriate exception if letters or just the enter key instead of numbers are entered. The application must continue to display the menu and process these options until the user enters a 6.
    4. When the user chooses menu option 1, prompt for the user to enter the appropriate data for a House object. Read the data using a Scanner and System.in. Implement the following edits: numeric input values must be greater than zero; String input values cannot be null or have a length less than one. If any one piece of input data is invalid, prompt the user to re-enter that data. Continue to prompt the user until a valid value is entered. If all the data is valid, create a House object and store it in the ArrayList. Catch the IllegalPropertyArgumentException when calling the constructor. NOTE: Any String input value must allow spaces. For example, the address must allow entry of data like “100 Main Street”.
    5. When the user chooses menu option 2, prompt for the user to enter the appropriate data for an Apartment object. Read the data using a Scanner and System.in. Implement the following edits: numeric input values must be greater than zero; String input values cannot be null or have a length less than one. If any one piece of input data is invalid, prompt the user to re-enter that data. Continue to prompt the user until a valid value is entered. If all the data is valid, create an Apartment object and store it in the ArrayList. Catch the IllegalPropertyArgumentException when calling the constructor. NOTE: Any String input value must allow spaces. For example, the address must allow entry of data like “100 Main Street”.
    6. When the user chooses menu option 3, prompt the user to enter a property ID. Search the ArrayList to find the object with this ID. Remove this object from the ArrayList if found. Display an error message if not found or if the ArrayList is empty. Be sure to test deleting the last property from the array list.
    7. When the user chooses menu option 4, list all the objects contained in the ArrayList by calling their toString method. The objects must be listed in order of their value with the lowest value property listed first. Use the comparable for this.
    8. When the user chooses menu option 5, list all the objects contained in the ArrayList by calling their toString method. The objects must be listed in order of their zip code with the lowest zip code property listed first. Use the comparator for this.
    9. When the user chooses menu option 6, check to see if the ArrayList has any Property objects in it. If it does, write each object to a binary file (properties.dat). Make sure you write each object to the file NOT the ArrayList. Then display the message “Thank you for using the Property Manager” and end the application. The data must be written to a relative file location using the file name properties.dat. Make this file name a class constant and use the constant in your code wherever necessary. Use try with resources when writing the file. Make sure you test your application with and without a properties.dat file present. 
    10. When the application first starts check to see if the property.dat file exists. If it does, read each Property object and store it in the ArrayList. If the file doesn’t exist just continue with an empty ArrayList. Use try with resources when reading the file.
  11. Add comments to each file in your project. At a minimum this must include your name and the date. 
  12. You can resubmit your assignment any time up to the deadline. Projects cannot be submitted late. 
  13. Please zip ALL your project files and attach the .zip file to the assignment drop box.
  14. This assignment is designed based on the material covered to this point in the text book and online notes. Use only features and code covered to this point in the book, online notes, or Discussions. Failure to follow this rule may result in a zero for your assignment. Why?

Skills Required

Dissertation Writing

Category

programming
Project Urgency:04/29/2020

Employer Information

1 project(s) posted hire 0 freelancers
Member since: 2020-04-29
FREELANCER BIDDING (2)

jessica simpson

Data Analyst and Statician

UK

5 year(s) experience

12 project(s) worked

$150.00

in 3 days

Please consider my bid

Louisa Labu

Academic Writer

UK

4 year(s) experience

18 project(s) worked

$120.00

in 2 days

I will deliver

Open chat
1
Whatapp Us
Hey? You want your project done, Whatsapp us Now.
Click to Submit a Project