Get BIT203 Assignment Plagiarism free Solution With Code in Java
BIT203 Assignment 1
Due date: 2:00 pm, 18th October, 2019
Assessment Mode: Individual Assignment
This assignment has been designed to allow students to test and demonstrate their ability to
write a Java program that uses a range of different concepts and facilities. This assessment
relates to the following learning outcomes:
• design and write programs using several classes, including problem domain classes; and
• understand and implement object-oriented principles and key concepts in modern software
design such as inheritance, association, encapsulation, and reusable software.
In particular, this assignment tests the students ability to use appropriate class hierarchies and
Expected Learning Outcomes Assessed
• LO1: write programs using several classes based on UML class diagrams and other models;
• LO2: apply object-oriented concepts in the design and implementation of the programs;
• LO3: use and extend Java interfaces and classes in the implementation of their programs
Your assignment has to submit to TurnItIn, with the following all contain in a single file:
1. All your Java source files, printed in Word document format
2. Printed output (showing your interactivity with your program) is to be included at the end
of your Java source files, in Word document created in (1)
3. A Turnitin Report, again to be attached within the Word document created in (1)
Turnitin Report (http://www.turnitin.com)
Register yourself in AdvJavaS319 using the following details:
class ID : 22523789
Enrollment password: java2S319
MicroHousing System in Kuala Lumpur
Big cities are always expensive to live in, but even more so for young people who have to live
independently, whether they are college students, fresh graduates or job seekers.
Proposals to alleviate the housing crisis in major cities have been proposed in the United States
and-a-business/), Hong Kong (https://www.scmp.com/lifestyle/article/2142632/six-ways-solvehong-
Youths in Kuala Lumpur also face similar problems. Therefore, the Kuala Lumpur City Hall (DBKL)
has proposed a scheme to help youths to rent accommodation at affordable prices
Your job is to create the information system for the MHS (Micro Housing System) for DBKL. Some
analysis and design artifacts have been developed. The use case diagram (Figure 1) shows the main
users of the system and basic functionalities.
The Conceptual Model shown above depicts the relationship that exists between classes in this
assignment. The User class is an abstract class, and is the superclass to the two concrete
subclasses – Applicant and HousingOfficer. For all classes, you may include additional
methods if you wish to do so, for example the toString, and equals methods. Two users are
considered equal if their username are the same.
A MHS object references a collection of Users and a collection of Residences. These two
collections are separate. You will also notice that Residences are linked to the Application class
as well as the Unit class. Class Unit is an inner class of Residence. Both classes, Application
and Unit, are linked together throught the class Allocation.
The following shows the high level use cases for the functionalities stated above.
Use Case Set Up New Residence
Actors Housing Officer
Description The Housing Officer is responsible a particular Residence, and thus for setting up
information about a new residence that is ready for occupation. The residenceID,
address, number of units available, size of each unit and monthly rental is
recorded. The Units are created according to the number of units entered. The
availability of each unit is set to “available”.
Use Case View Residences
Description The Applicant selects to view residences. For each residence, the residence ID,
address, monthly rental, size of each unit and number of available units is shown.
Use Case Submit Application
Description Before submitting an application for a unit, the Applicant will have to login or
register by entering a username, password, fullname, email and monthly Income to
create an account. (May need to submit copy of payslip to prove income).
The applicant selects the residence to submit an application for, and the month and
year that the unit is required. An application is created for the applicant and the
status is set to “New”
Use Case View Applications
Actors Applicant, Housing Officer
Description If the user is a Housing Officer, a list of applications with status “New” or “Waitlist”
for the Residence that the Housing Officer is responsible for is shown, showing the
Application ID, Residence ID, number of units available and monthly rental,
applicant username, monthly income, month and year required.
If the user is an Applicant, a list of applications that have been made by this
Applicant is shown, showing the Applicaton ID, Residence ID, number of units
available and monthly rental, and application status.
Use Case Allocate Housing
Actors Housing Officer
Description The Housing Officer selects an application to allocate housing by selecting the
residenceID, unitNo, fromDate and duration (12 months or 18 months) for the
allocation. The status of the application is set to “Approved”. The endDate of the
allocation is automatically calculated. All other applications for the same Applicant
are set to “Rejected”.
If the Applicant is not eligible for rental then all applications for that applicant are
set to “Rejected”.
The Housing Officer may also set individual applications to “Waitlist”.
Your task is to create a console styled interface class named MHSConsole. This console
interface class will provide a menu that allows a user of your program to perform the following
§ create a ‘single’ working microhousing system (MHS) object;
§ given a username, password, fullname, email, and monthlyIncome ADD an Applicant to
the created MHS object;
§ given a username, password, and fullname, ADD an HousingOfficer to the created MHS
object. Staff ID number for the officer will be generated automatically;
§ given a residence address, number of units, size per unit, and monthly rental, ADD a
Residence to the created MHS object. When adding a residence, you need to associate it
with the housing officer that is responsible for creating it, and also initialise the units in it;
§ allows an Applicant to view the available residence;
§ allows an Applicant to apply for available residence;
§ allows an Applicant to view the status of their submitted applications;
§ allows a House Officer to view submitted applications;
§ allows a House Officer to allocate housing or reject applications;
§ display detail of all users, either in original sequence, or sorted according to fullname;
§ display detail of all residences;
§ display detail of all applications; and
§ display detail of all allocations.
NOTE: The details of some tasks are shown in the high level use cases in the previous page.
Your design should decouple console functions from the other classes. In other words, code
that displays text on the console and accepts user input should appear ONLY in the
MHSConsole class. The only exception to this would be the use of ‘print’ statements in the
main method of other classes for testing purposes only. In completing this assignment you
should carefully consider the design of EACH class. Once you have coded each class, test its
functionality completely. Once you have the abstract User class constructed and tested, work
on the derived sub classes. Make use of ‘getters’ and ‘setters’ to access and alter ‘model’
attributes. Your console style interface should allow the functionality specified above to be
fully tested. Do not write a GUI interface, write a console style interface for this assignment
Your source code should contain javadoc comments and tags as follows:
• for classes, to indicate their purpose;
• for methods, to indicate their effect, parameters and return values, as well as any
exceptions they throw; and
• for fields, to indicate their purpose.
You may choose names for applicants, housing officers, residences, etc as you please. You
may submit as many tests of your classes and of your program as you think necessary, though
the reason for each should be explained.
Refer to the Excel file, 203A1MS_S319.xlsx, for detailed breakdown of the marks allocated for
If your program does not meet the requirements by the due date you should obtain help from
the lecturer and notify the lecturer that you will submit the assignment late (marks will be
Note about testing and plagiarism
It is very important that you complete this assignment alone. You may of course obtain general
assistance from the lecturing staff in the subject and your peers, but the coding must be carried
out yourself. It is normally quite easy to detect when two or more students work together on
It is also very important that the demonstration of the results of your program using the given
test data is produced using the identical version of the program to the printout of your source
code. Students who hand in substantially similar assignments or whose programs do not
match their demonstration of testing will fail the assignment.
Any student suspected of copying, or of not producing the work himself or herself, can be
called for oral examination, where the student will be expected to demonstrate sufficient
knowledge of the application to show that it is his or her own original work.