Scenario:

You land a summer job at a company that manages one-week rental properties and have been asked to create an application to manage the rental property inventory. At this time, only up to 12 properties may be in inventory at a given time. Each rental property has a system-generated ID (IDs start at 100 and increment by 1 for each new property), nickname (e.g. Beachside Villa) and number of rooms in the rental property. All rental properties have between 3 and 9 rooms, inclusive. The rental cost of each rental property is calculated by taking a flat fee of $400 and adding $150 for each room in the rental property.

Create an application that begins with a main menu containing the following options:

  • Add New Property
  • Delete Property
  • Rent Property
  • Vacate Property
  • Quit Application

The Add New Property option must allow the user to enter the nickname and number of rooms for a property. If the maximum number of properties has already been entered, the user must see an error message.

The Delete Property option must allow the user to see a list of all property nicknames and then choose which property they would like to delete. If the user selects an invalid property, the user must see an error message and be returned back to the main menu.

The Rent Property option must allow the user to see only a list of rental property nicknames where the rental property is available to rent and then choose which rental property should be rented. Upon selecting the rental property, the rental propertys status should be marked as unavailable and the user should see all details about the rental property including the ID and rental cost. If no rental properties are available for rent, the user must see an error message. If the user selects an invalid rental property to rent, the user must see an error message and be returned back to the main menu.

The Vacate Property option must allow the user to see only list of rental property nicknames where the rental property is not available to rent and then choose which rental property should be vacated. Upon selecting the rental property, the rental propertys status should be marked as available. If no rental properties are being rented, the user must see an error message. If the user selects an invalid rental property to vacate, the user must see an error message and be returned back to the main menu.

The Quit Application option must display a summary report including the total number of rental properties, number of rental properties rented, number of rental properties vacant, and total income being generated (this is the total rental cost across all rental properties currently being rented).

Once a user selects any option other than Quit Application, and the option is finished executing, they should be re-prompted to enter another option.

Other Requirements:

  • Your solution must use object-oriented techniques (No points earned for a procedural solution).
  • Your solution must include appropriate constants, constructors, accessors (including a toString() method), mutators, and special purpose methods
  • Your solution must demonstrate use of arrays. You may not use ArrayLists.
  • You may not use Scanner or System classes for input/output. You must use JOptionPane.
  • You may not use System.exit, or any variant that exits the program in the middle of the program. The program should only exit once the algorithm has finished completing.
  • Your solution may not use any functions or language constructs not covered during IT 106 or this semesters IT 206 without prior authorization from your instructor, even if you know other functions or language constructs. We want everyone to be on the same "playing field", regardless of previous programming exposure, and get practice with algorithmic design to solve problems (the intent of the course). Using something existing not discussed in class does not give you as much practice as solving the problem yourself. Doing this may lead to a substantial grade penalty, a grade of zero, or an Honor Code inquiry. When in doubt, ask!

Programming Assignment 3: Solution Design

  • List the class(es) that will be needed to solve this problem
  • Create a detailed UML class diagram
  • Create a defining diagram/IPO hierarchy chart detailing the implementation design (Note: You must do this, but it is not required to be submitted)
  • Create an object map (Note: You must do this, but it is not required to be submitted)
  • Create pseudocode detailing your solution design
    • Data Definition Class(es) You must provide pseudocode ONLY for validating mutators and special purpose methods. No pseudocode is necessary for constructors or accessors
    • Implementation Class You must provide pseudocode for all methods

Programming Assignment 4: Solution Implementation

Write a well-documented, efficient Java program that implements the solution design you identified. Include appropriate documentation as identified in the documentation expectations document.

Note: You may not use the Scanner or System.out classes. For input/output, you must use the JOptionPane class.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.