CMSC203 Fall 2026 Assignment #4 – Java Property Management Application Answered

$35.00

This downloadable ZIP file covers a Java Property Management Application featuring object-oriented programming, aggregation, arrays of objects, deep copy constructors, and rental income calculations. The resource addresses property management functionality, console-based operations, JavaFX GUI requirements, JUnit testing, and UML class design.

Original Work ?

Download Details:

  • Name: Assignment4-rovgxc.zip
  • Type: zip
  • Size: 619.13 KB

Category: You will Instantly receive a download link upon Payment||Click Original Work Button for Custom work

Description

5/5 - (1 vote)

CMSC203 Fall 2026 Assignment #4 focuses on developing a Property Management Application in Java using object-oriented programming principles. The assignment covers aggregation, arrays of objects, copy constructors, encapsulation, and JUnit testing. Students implement Property, ManagementCompany, and PropertyDriver classes to manage rental properties, calculate total rent, and support console-based and JavaFX interfaces.

Assignment Description

Design and implement a Property Management application in Java that manages multiple properties owned or managed by a company. The application will maintain an array of Property objects inside a ManagementCompany object (aggregation), support adding and listing properties, calculate total rent, include copy constructors, and provide both a console-based driver and a JavaFX GUI.

This assignment covers Chapters 1–7 and beyond the basics of classes: arrays of objects, aggregation, copy constructors, and simple unit testing with JUnit.

 

 

 

  • A driver and utilities classes

 

  • Aggregation
  • Arrays
  • Copy Constructors
  • JUnit
Assignment Details

 

 

 

 

 

Implement at least the following classes:

  1. Classes and Aggregation
    • Property class: represents a single rental property.
    • ManagementCompany class: contains an array of Property objects (aggregation) and related methods.
    • PropertyDriver class (console driver with main).
  2. Property Class
    • Private fields such as:
      • String propertyName
      • String city
      • double rentAmount
      • String owner
    • Constructors:
      • Default constructor.
      • Parameterized constructor.
      • Copy constructor: takes another Property object and copies its fields.[6][2]
    • Getters and setters for all fields.
    • toString() for display.
  3. ManagementCompany Class
    • Private fields:
      • String name
      • String taxId
      • Property[] properties (fixed-size array, e.g., max 5).
      • int propertyCount
    • Constructors:
      • Parameterized constructor.
      • Copy constructor that deep copies all properties.[2][3]
    • Methods:
      • int addProperty(Property p) – adds a property to the array (copy into the array) and returns index or error code if full.
      • double totalRent() – returns sum of all property rents.
      • int getPropertyCount() – returns current count.
      • String toString() – summarizes company and its properties.
  1. Driver Class (PropertyDriver)
    • Contains main.
    • Creates a ManagementCompany, adds several Property objects, and prints the company information.
    • Demonstrates:
      • arrays of objects,
      • use of copy constructors,
      • aggregation (ManagementCompany “has-a” Property[]).[1][3]
  1. JUnit Tests
    • Test Property constructors and copy constructor- Name: PropertyJUnitTestStudent.java
    • Test ManagementCompany-Name: ManagementCompanyJUnitTestStudent.java
      • adding properties,
      • total rent.
    • PropertyDrive-Name: PropertyDriverJUnitTestStudent.java

 

Use at least 4–5 test methods to validate behavior.

 

 

 

 

 

 

Screenshots for CMSC203 Pr4

 

Add Property:

====================================

   Assignment 4: Property Manager  

====================================

1 – Add Property

2 – Display All Properties

3 – Show Total Rent

4 – Exit

 

Enter choice (1-4): 1

Enter property name: Property-1

Enter city: Rockville

Enter monthly rent: 3500

Enter owner name: Joe

Property added at index 0.

 

Add another property:

====================================

   Assignment 4: Property Manager  

====================================

1 – Add Property

2 – Display All Properties

3 – Show Total Rent

4 – Exit

Enter choice (1-4): 1

Enter property name: Property-2

Enter city: Gaithersburg

Enter monthly rent: 2500

Enter owner name: Mary

Property added at index 1.

Display All Properties:

====================================

   Assignment 4: Property Manager  

====================================

1 – Add Property

2 – Display All Properties

3 – Show Total Rent

4 – Exit

 

Enter choice (1-4): 2

Management Company: Campus Realty (Tax ID: 123-45-6789)

Properties:

  0: Property-1, Rockville, Rent: $3500.00, Owner: Joe

  1: Property-2, Gaithersburg, Rent: $2500.00, Owner: Mary

Total Rent: $6000.00

 

Show Total Rent:

====================================

   Assignment 4: Property Manager  

====================================

1 – Add Property

2 – Display All Properties

3 – Show Total Rent

4 – Exit

 

Enter choice (1-4): 3

Total rent: $6000.00

 

Display menu again:

====================================

   Assignment 4: Property Manager  

====================================

1 – Add Property

2 – Display All Properties

3 – Show Total Rent

4 – Exit

 

Enter choice (1-4):

 

 

 

 

 

Test your program with at least 3 test cases. Make sure your tests cover all the possible scenarios. Refer to the Test Plan Guideline on how to write a Test Plan.

 

Test Case # Input   Expected Output

 

Actual Output

 

 

Did the test pass?

 

1  

 

       
2          
3          
           
 

 

 

 

 

 

 

 

 

Create a UML diagram for Assignment 4 based on the Assignment 4 Description given to you for each class. Be sure to show the relationship between classes

 

 

 

Deliverables / Submissions and Deliverable format:

  • The Java application must compile and run correctly, otherwise project grade will be zero.
  • The detailed grading rubric is provided in the assignment rubric excel file.
  • Your source code should contain proper indentation and documentation.
  • Documentation within the source code should include:
    • additional Comments to clarify the code, if needed
    • “Paragraph” comments at beginning of each method.
    • class description comments at the top of each program containing the course name, the project number, your name, the date, and platform/compiler that you used to develop the project, for example:

/*

* Class: CMSC203

* Instructor:

* Description: (Give a brief description for each Class)

* Due: MM/DD/YYYY

* Platform/compiler:

* I pledge that I have completed the programming

* assignment independently. I have not copied the code

* from a student or any source. I have not given my code

* to any student.

Print your Name here: __________

*/

The deliverables will be packaged as follows. Two compressed files in the following formats:

  • zip, a compressed file in the zip format, with the following:
    • src folder:
      • includes only .java files that you have modified or created.
    • Word document that includes (use provided template):
      1. Screenshots:
        1. One screenshot of the application running from the command prompt.
        2. One screenshot of the application running in your IDE.
        3. Screenshot of Java file (Assignment4.java) in your GitHub

 

  1. Test Plan
  2. UML diagram
  3. Lessons Learned: Provide answers to the questions listed below:
    1. Write about your Learning Experience, highlighting your lessons learned and learning experience from working on this project.
    2. What have you learned?
    3. What did you struggle with?
    4. What parts of this assignment were you successful with, and what parts (if any) were you not successful with?
    5. Provide any additional resources/links/videos you used while working on this assignment/project.

 

  • FirstInitialLastNamezip, a compressed file containing one or more Java files (This folder SHOULD NOT contain any folders and it should contain Java source files only):

.java files that you have modified or created.

Solution Overview

The solution addresses Java class implementation, property aggregation, deep copy constructors, fixed-size array management, property registration, rental income calculations, and property listing functionality. It also covers console-based menu operations, JavaFX GUI requirements, JUnit testing, UML class relationships, and test planning.