Reference no: EM133766430
OBJECT-ORIENTED PROGRAMMING
Introduction
Part A
This is an individual assessment in which you will develop programs using Java programming concepts and OO principles based on problem definitions provided. You will be required to complete tutorial questions, laboratory exercises and a supervised programming test.
Problem Description: Comparing Loans
Write a program that lets the user enter the loan amount and loan period in number of years and displays the monthly and total payments for each interest rate starting from 5.00% to 8.00%, with an increment of 1/8. Here is a sample run:
<Output>
Loan Amount: 10000 Number of Years: 5
<End output>
Use the formulas below to compute monthly payment and total payment.
Design: (Describe the major steps for solving the problem.)
Coding: (Copy and Paste Source Code here. Format your code using Courier 10pts)
Output screenshot: (Paste your output screenshot here. You need to apply the currency and percentage formats as well)
Part B
Write a program in java for class name BankAccount1, by creating an instance, accessing properties using accessor methods, and modifying properties using mutator methods.
Properties/Attributes/Fields/instance variables:
Account Number (String)
Account Holder Name (String)
Balance (Double)
Account State (String) (for later use only)
Constructor
Takes all above fields as parameter
Methods:
Accessor
Mutator
Support methods (if required)
<Output>
Account Number: 123456789 Account Holder Name: John Doe Balance: 1000.0
Account State: Active
Updated Account Information:
Balance: 1500.0
Account State: Suspended
<End Output>
Design: (Describe the major steps for solving the problem.)
Coding: (Copy and Paste Source Code here. Format your code using Courier 10pts)
Output screenshot: (Paste your output screenshot here.)
Testing: (Describe how you test this program)
Part C
For this tutorial session, students are required to appear in practical test by demonstrating the execution of a Java program.
Participation in person during the tutorial session is mandatory for all students. Those who do not attend the test during the tutorial session will be marked as absent.
Supervised testing during week 6.
Only one attempt is allowed.
ONE Double-sided handwritten A4 sheet
Assessment 2:
Write a class named Movie with fields for a movie's title, director, and duration in minutes. Include get and set methods for each field. Include an equals() method that indicates that two movies are equal if they have the same title and director. Write a toString() method to print the movie's details. You need to write two (2) constructors for this class: an empty constructor; a constructor to initialise all fields.
Write the main method in the testCircle class and call relevant methods by creating the object of Circle class.
Create 2 objects circle1 and circle2 for Circle class.
Set the radius and color for circle1 to 5.0 and "Red".
Set the radius and color for circle2 to 3.5 and "Blue".
Print the details of both circles using the toString method.
Print the area of both circles using the getArea method.
ASSESSMENT ITEM 3:
You will design and implement an application after analysing the requirements provided in a case study. You are required to apply basic constructs and object- oriented programming principles in developing this software system.
Part A: Design Using UML Diagram
Description:
In Part A of the project, you will focus on the design aspect of the Library Management System by creating a comprehensive UML diagram. This phase involves thoroughly understanding the system requirements and identifying all necessary classes, attributes, methods, and relationships. The UML diagram should accurately represent the system's structure, including the Book, Patron, Loan, Library, and Main classes. Each class will include its respective attributes and methods, showcasing the relationships and interactions between them, such as associations and aggregations. The UML diagram must follow standard UML conventions, ensuring clarity and precision. Additionally, a brief documentation will accompany the diagram, explaining the design decisions and how they align with the project requirements. This part aims to provide a solid foundation for the implementation phase by offering a clear and well-structured blueprint of the system.
Task Breakdown
Understand the Requirements
Review the problem description and identify all classes, attributes, methods, and relationships.
Ensure all functionalities are well understood before proceeding.
Identify Classes and Relationships
Define the classes: Book, Patron, Loan, Library, Main.
Identify relationships between classes (e.g., Library contains Books, Patrons, and Loans).
Create UML Diagram
Draw the UML diagram with the following components:
Classes with attributes and methods.
Relationships (associations, aggregations, compositions).
Inheritance where applicable.
Ensure the diagram is clear and follows UML standards.
Documentation
Provide brief explanations of each class and their relationships.
Justify design decisions and how they meet the project requirements.
Part B: Implementation in NetBeans IDE
Description:
Part B of the project involves the actual implementation of the Library Management System in Java using the NetBeans IDE. In this phase, you will translate the UML diagram from Part A into a functional Java program. This includes setting up the project structure in NetBeans, defining the Book, Patron, Loan, Library, and Main classes, and implementing their respective attributes and methods. The focus will be on adhering to object-oriented principles such as encapsulation, inheritance, and polymorphism while ensuring proper error handling and user-friendly command-line interaction. The Main class will feature a command-line interface that allows librarians to navigate the system and perform tasks such as adding/removing books and patrons, checking out/returning books, and displaying information.
Thorough testing will be conducted to verify the functionality of each feature, with screenshots captured as evidence. The final deliverable will include detailed documentation, code listings, and trial run evidence compiled into a Word document, accompanied by a README file with instructions on how to run the program. This part aims to bring the design to life, ensuring the system operates smoothly and meets all specified requirements.
Task Breakdown
Set Up the Project in NetBeans
Create a new project and set up the necessary packages and classes.
Ensure the project structure is well-organised.
Implement Book Class
Define attributes and methods.
Ensure proper encapsulation and error handling.
Implement Patron Class
Define attributes and methods.
Handle book checkouts and returns appropriately.
Implement Loan Class
Define attributes and methods.
Implement overdue fee calculation and information display.
Implement Library Class
Manage collections of books, patrons, and loans.
Implement methods for adding/removing books and patrons, checking out/returning books, and displaying information.
Implement Main Class with Command-Line Interface
Create an interactive menu system for librarians.
Ensure navigation is user-friendly and handles errors gracefully.
Testing and Documentation
Test all functionalities thoroughly and capture screenshots.
Create a README file with instructions on how to run the program.
Combine design document, code listings, and trial run evidence into one Word document.
Workplan / Work breakdown Agreement (WBA)
You are expected to work as a group on this assignment and contribute very closely to approximately an equal amount of work (unless the special consideration policy outlined applies). In your workplan you must provide details about the contributions and how the work is organised and managed. In most cases, if this is followed, students will receive equal marks on those aspects to their teammates.
Task 1: Implementation
Design in the code matches the design in the class diagram.
Coding standards. Applies to any code that has been touched by human hands (e.g. meaningful variable and method names, commenting, layout). We will look for meaningful identifier names (variable, classes, methods), inline comments, method header comments, class/module comments, layout.
Functional Completeness: All features are fully implemented, and snapshots are included in the report.
Task 2: System Demonstrations
Please start the video by discussing the contribution of each team member (i.e., which team member was responsible for which component in the system).
Students demonstrate understanding of the system, the relationship between the code and the design documents of the system.
Students should point out where in their code the constructs shown in their design documents are implemented.