It is expected that each student will creatively design and

Assignment Help Basic Computer Science
Reference no: EM13342070

This assignment requires you to complete various tasks involving classes that are provided to you as a basic structure for building upon. You may also use classes that you find in the SDK. You will write your own class(es) that will create a GUI using the swing library. The focus of Assignment 2, is your development of a GUI using java swing packages, which is why you are being provided with some classes already written. 

You will be required to develop your application using Java in the Eclipse environment. You will need to zip the whole project up when you are finished and submit it on Moodle by the due date. You will also need to submit a report (both electronically in Moodle and as a hard copy (consult your tutor to see if hardcopy is required)). The report will require some written and diagrammatic information describing your system as well as addressing documentation, design and testing requirements which will be outlined in the various tasks. Please write clearly and IN YOUR OWN WORDS (plagiarism is NOT acceptable – refer to Course Description). It is expected that no submissions will be identical, so ensure that your GUI has some unique elements to it. Be creative! 

It is expected that each student will creatively design and author a unique system based on individual choices that fit with the requirements listed in each task. Before you begin, read over the entire assignment and understand all the tasks. You are to make use of the provided code files, but must additionally write your own classes. Acknowledge all code that you do not write yourself (but include in the classes you add), with in-code comments. 

All code must conform to stylistic standards including proper commenting, appropriate choice of identifier names, proper indenting and other readability issues. Otherwise, marks will be deducted. Consult https://www.oracle.com/technetwork/java/codeconventions-150003.pdf 

Your tutor may require you to demonstrate your GUI during a lab class in week 11. 

Contextual/Background Information: 

For this assignment, you will create a Graphical User Interface that provides the user with access to the functionality of a Real Estate Management System. Such a system would typically be used by a Real Estate Agency to help manage the details of its clients, which include both landlords and tenants. This section of the Assignment explains the roles of these clients, and the behaviour that the system should allow. 

When a property owner has a house/property that they wish to make available to other people to possibly live in, they will typically go to a Real Estate Agency to enlist their services. The services include helping to find a suitable person/family to be tenants who will pay rent for the privilege of living in the house. Other services of the agency include collecting the rent, and managing other legal obligations regarding the property. 

The agency will first advertise the availability of properties to the general public. Interested people can request to look at the property, and then if they like a property, they can submit an application to rent the property. Once approved by the landlord, the interested person signs a lease, which is a formal contract to commit to paying the weekly rate of rent to the agency, for use of the property. The tenant must pay for whole weeks at a time, but can make payments in advance. 

Sometimes during a lease period, there may be some need for maintenance/repairs to be done on properties, in which case, the Agency will arrange the maintenance to be done but then deduct the cost from the next monthly payment to the landlord. For example, maybe the children were not playing carefully and smashed a window – requiring it to be replaced. Or maybe the hot-water service stops working and needs to be replaced. 

(You can assume that the total cost of all repairs is always below the total rent collected). 

Provided Files: 

You are being provided with a few code files which contain the basic essence of the data management aspects of the system, but need to write classes to provide a graphical user interface. The following is a description of the provided classes: 

• The RealEstateAgency class is intended to be the central place to go in the system for finding a landlord that the system -knows- about. There are methods to add a new landlord, and to find an existing landlord or to get an ArrayList of all the currently known landlords. 

• The Landlord class allows you to create objects that encapsulate the key data about each Landlord, as well as the information about all the properties that they make available for rent (some of which may have current leases active). There are methods to associate additional properties with a landlord, as well as to get an Iterator that allows you to cycle over all properties owned by the landlord. 

• The Property class encapsulates the basic information about one property the system knows about: essentially the address of the property, and a reference to the Lease details of the property. 

• The Lease class encapsulates information about an individual lease of a property by a tenant. The data stored here includes all the tenant’s details (name, phone number) as well as characteristics of the lease itself such as the duration, the weekly rent amount (which cannot change during the lease period). Each lease is for either 6 or 12 months. However, the as program allows for you to simulate the passing of time by the collection of rent, the class also keeps track of how many weeks of rent remain to be paid. It also keeps track of details about all maintenance that has happened to the property during the period of this lease. There are methods to allow you to consider a rent payment to be made, and also to add or retrieve maintenance records. 

• The Maintenance class is used to represent an individual occurrence of Maintenance – and records the cost and description of the maintenance. 

If you feel you need to add additional methods to any of the provided classes, you may, but need to include in your documentation an explanation of the reason for adding the new methods. 

Required behaviours in the final system 

The following are the behaviours (functionality) which the user should be able to accomplish by using the completed program: 

1. Ability to add a new Landlord to the system 

The user needs to be able to enter the details about a new landlord. This means that the program will present a screen asking for the following information about the landlord, to then store in memory: 

• name of landlord 

• address of landlord, so that mail and other communication can be sent by post 

• phone number of landlord, in case of urgent contact 

• bank account number, so that money can be paid to the landlord. The bank account number should be between 6 and 10 digits long only. 

Provided that all the above information is correctly given by the user, the program should proceed to create a new Landlord that is stored in the system. 

Initially, a landlord will not be associated with any properties or leases until the user adds the details. 

2. Ability to create new properties for a landlord 

The user needs to be able to enter the details (i.e. the street address) about a new Property and choose an existing Landlord as the recorded owner of the property. You must design an appropriate mechanism by which the user can enter this information, such that the property is initially considered as available for leasing. 

3. Ability to create a new lease for a tenant 

The user needs to be able to create new leases in the system. They should be presented with a list of all the available properties (i.e. ones that do not have a current lease), so the user can select which one to make the lease for. The program should then be able to enter all remaining details about the lease such as the tenant name, the weekly rent amount, whether it is a 6 or 12 month lease. The new lease should be recorded in the system, so that it could be used in the ‘pay rent’ behaviour. As lots of information is needed for this, and sometimes there are specific values that are valid, think carefully about which components are best to reduce the chance of erroneous input and explain your decisions in the supplementary documentation that you submit. 

4. Ability to record the receipt of a rental payment 

From time to time, the tenants will come to pay their rent. It is assumed that when they make payments, they will pay for whole weeks only. The program should allow the user to easily select which property the payment is for (possibly including specifying the landlord who owns the property). It should also ask how many weeks is being paid for. If the user enters a number that is greater than the number of weeks remaining on the lease, this should generate an error message rather than do any calculations. But if a sensible value is entered, this payment should be recorded, and the program should generate a message saying how many weeks still remain to be paid on the lease, if any. 

5. Ability to record details of property maintenance during lease period 

Sometimes there will be a need for repairs or other works to be done to the property to keep it liveable for the tenants, for example, maybe the water heating device breaks and needs to be replaced. The program needs to allow the user to select a property (that has an active lease), and to specify the cost and description of a maintenance task. It is possible there could be multiple maintenance tasks during the period of a single lease. 

6. Ability to display a report about a landlord’s properties 

The program should allow the user to select a landlord to produce a report (in a text-based component) about their net income for each of their properties, and to list the properties that are not currently leased. By net income is meant the amount left over after deducting the maintenance costs from the amount of rental income received during the particular lease. 

This report should show the following information about each of the landlord’s properties: 

• The address of the property 

• Whether it is not currently leased; otherwise, the following details… 

• Who the current tenant is 

• The amount of rent charged each week 

• A list of all the maintenance charges during the period of the lease 

• The net income for this property during this lease. 

For the list of maintenance, include both the cost as well as the description of the maintenance that was performed. 

The following is an example of what may be displayed for the landlord named “Fred Flintstone” who has 2 properties leased to tenants, and another property that currently does not have a tenant. 

Report for Landlord: Fred Flintstone 

Property: 53 Spring St, Northland 

Weekly Rental Rate: $240 

Tenant: Donald Duck 

6 Month Lease (20 remaining payments) 

Maintenance History: 

$800 new Hot Water Service 

$140 Glass Window Repairs 

Total Earnings: $500 

Property: 107 Bedrock Avenue, Bedrock 

Not currently leased 

Property: 72 Long St, Westfield 

Weekly Rental Rate: $685 

Tenant: Clive Palmer 

12 Month Lease (49 remaining payments) 

Maintenance History: 

None so far 

Total Earnings: $2055 

End of report for Fred Flintstone 

Tasks to complete in your submission 

Task 1 Designing and Documenting your system 

1. Create a supplementary document named: surname StudentID Assign2.doc . In your document, you must include the following section headings: GUI Design, Testing. 

GUI Design 

Draw a schematic picture of your GUI design. On your diagram, highlight where you intend each panel to be and the contents of each panel (e.g. buttons, lists, radio buttons, labels). Where you have content to be displayed based on an object in your code, note this on your diagram. Also, indicate the events you expect your GUI to respond to and what happens following each event. For example, “when the button XXX is pressed, this event will trigger a call to method YYY which will perform a calculation using the values selected in the list and display the result in the text field in the center panel.” 

Testing 

As you develop your GUI classes and methods, you will write testing scenarios to verify that your code is working correctly. In this section, you will describe your chosen test data and explain how that data helps you test your code. Make sure that you choose a variety of test cases to ensure you can be satisfied that your code is working. Include screen shots of your testing results in this section. 

Task 2 Creating your GUI 

Using Eclipse, study the provided files, and add classes of your own, to make a functioning GUI-based program that achieves the behaviours outlined earlier in this document. In particular: 

1. Write a new class named MySystemGui. In this class, you need to extend the JFrame class and implement the appropriate listeners so that your system will work. The main thing which must be provided by this frame is a mechanism by which to indicate which behaviour the user wishes to perform. For example, perhaps there are buttons that will open other frames when clicked; or maybe every behaviour is catered-for by this Frame. In any case, across the whole GUI system you must include the following elements somewhere: 

class MySystemGui 

I. at least 2 working buttons that trigger appropriate calculations or processing or reporting on information stored in underlying objects 

II. at least 5 labels 

III. Either radio buttons or checkboxes must be used in at least one place 

IV. a JList must appear in at least one place somewhere in the system 

V. a text field that allows the user to input a value to search for, with a button to trigger the search. When this button is pressed, the search will be triggered and the results will be displayed either to the console or a textarea in a panel on the GUI. (Note, the actual search may already be provided by the given code). 

VI. You must yourself make use of an iterator to cycle through a group of objects in at least one place in the code you write. 

VII. implementation of appropriate listeners to respond to events from buttons and other components. 

2. In your MySystemGui class, create a main method that will instantiate your GUI when run. 

3. In your documentation, explain how you have tested your code and the results of your testing. Include screen shots demonstrating the results when you tested your code. 

You should aim to write code following high quality coding practices, including comments, trapped exceptions and exhibiting good design where code is separated into separate methods 

Warning. In this task you are not allowed to use designer (drag and drop) tools provided by Eclipse or other IDEs. The whole program must be written manually. Failing to do so will result in no marks for the whole assignment. 

Task 3 (ITECH 6100 students only) 

Using examples from your own code, write half a page (at least 250 words) explaining the JFrame class in simple terms and each of the methods that you have used. Describe what an interface means and how you have in your assignment implemented an interface. 

Allocated Marks: See Course Description 

Due Date: See Course Description 

Please refer to the Course Description for information relating to late assignments and special consideration. 

The following criteria will be used when marking of your assignment: 

• successful compilation 

• successful completion of the required tasks 

• provision of all the required behaviors 

• adherence to the guidelines provided 

• quality of code that adheres to the programming standards for the Course, including: 

• comments and documentation 

• code layout 

• meaningful variable names 

You are required to provide the following documentation: 

• a statement of what has been completed and acknowledgement of the names of all people (including other students and people outside of the university) who have assisted you and details on what parts of the assignment that they have assisted you with 

• a table of contents and page numbers 

• tasks requiring written documentation as specified 

• list of references (including websites, the text book and any other resources) used (APA style); please clearly specify if none have been used. 

• a printed copy of your code (this may be included as an Appendix). Please include this because we can provide more feedback this way 

In addition to submitting a printed copy of your written report into your tutor’s assignment box (consult with your tutor if hardcopy is required), you should also submit the following using Moodle: 

• an electronic copy of your code. Zip up the project itself and submit with the name surname idNo Assign2.zip 

• a copy of your report (surnameStudentIDAssign2.doc) 

Student ID: Student Name: 

Task 1 10 

GUI Design and description 5 

Testing Description and results 5 

Task 2 30 

Behaviors: 

1. Ability to add a new Landlord to the system 

2. Ability to create new properties for a landlord 

3. Ability to create a new lease for a tenant 

4. Ability to record the receipt of a rental payment 

5. Ability to record details of property maintenance during lease period 

6. Ability to display a report about a landlord’s properties 

Implementation requirements: 

Suitable creation of JFrame descendant class(es) 

at least 2 working buttons that trigger appropriate calculations, with results displayed at least 5 labels Radio Buttons or Checkboxes JList to allow selection of something a text field that allows the user to input a value to search for and a search button implementation of appropriate listeners to respond to events An iterator used to cycle through a group of objects quality of code, comments, exception handling and design of code into separate methods 

Task 3 (ITECH6100 students only) 10 

Appropriate referencing of other documents, websites, or written sources 2 

Use of appropriate examples from code authored by student in this assignment 3 

Clear and well expressed explanation 5

Reference no: EM13342070

Questions Cloud

The processes and procedural considerations for implementing : For the purpose of this assignment, you will have to recap your previous assignment (in 250 words) and then provide a well-researched and informed report to the CIO.
Find the acceleration of the stone : A 2.00 kg stone is tied to a thin, light wire wrapped around the outer edge of the uniform 10.0kg cylindrical pulley shown in the figure below. Find the acceleration of the stone
Determine what is the least coefficient of static friction : A cat dozes on a stationary merry-go-round, at a radius of 5.4 m from the center of the ride. Then the operator turns on the ride and brings it up to its proper turning rate of one complete rotation every 6.2 s
What is the magnitude of the normal force on the addict : A circular-motion addict of mass 85 kg rides a Ferris wheel around in a vertical circle of radius 10 m at a constant speed of 6.0 m/s. (a) What is the period of the motion
It is expected that each student will creatively design and : It is expected that each student will creatively design and author a unique system based on individual choices that fit with the requirements listed in each task. Before you begin, read over the entire assignment and understand all the tasks. You are..
Estimate the net rate at which your body loses energy : If you lie on the ground at night with no cover, you get cold rather quickly. Much of this is due to energy loss by radiation. Estimate the net rate at which your body loses energy by radiation to the night sky under these conditions
Discuss the advantages and disadvantages of parties : Discuss the advantages and disadvantages of parties choosing to use arbitration to resolve a dispute arising under an international sale of goods contract
Find the magnitude of the electrical field at a position p2 : A long straight metal wire of radius r1= 3.10E-2 m is surrounded by a metalic cylindrical shell of inner radius r2= 1.19E-1 m and outter radius r3= 1.81E-1 m. The axes of the wire and the cylindrical shell coincide.
Define the heat of vaporization of liquid water : How much energy (in kilojoules) is released when 14.0 g of steam at 129.0^C is condensed to give liquid water at 78.0C? The heat of vaporization of liquid water is 40.67 kJ/mol, and the molar heat capacity is 75.3J/ K mol for the liquid and 33.6 J..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Feature set of free helix forensics cd

Visit Helix web site and read about feature set of free Helix forensics CD. Note that documentation for Helix is not on CD, to keep it down to ~700MB.

  Identify all substrings to create one of five given words

Given a string of letters, identify all substrings that create one of five given words. For example, if the words (arguments) are: structure; such; system; blue.

  Write the code that reads an integer number called test

Write the code that reads values for a,b,c and displays their sum, repeating this process as long as none of the three values are negative.

  The uml class

The UML Class, Sequence Diagrams etc, can be drawn in preferably NetBeans UML, if it is not convenient on that, any other UML tool would do

  Create incident response policy covers development-response

Policy to reduce network down-time if future incidents happen. Create incident response policy which covers development of incident response team, disaster recovery process and business continuity planning.

  What value is the log function sensitive

If x~y(both have values close to each other but not same), then we would expect some cancellation in computing log(x)-log(y). on the other hand, log(x)-log(y)=log(x/y), and the latter involves no cancellation. Does this mean that computing log..

  Test pseudocode by creating test plans and desk checks

Write down pseudocode for main menu. Write pseudocode for options, only code to navigate menu is required. Sketch flowchart for a main menu.

  Utilizing supporting documentation obtained

Please provide a one page response to the following topic utilizing supporting documentation obtained from your textbooks and the Internet.

  Fork function

Create a C program that takes an integer argument from the command line and outputs sum of all digits of the integer. For example, the result of the invocation sum of digits 12345 should be fifteen.

  How the chips are to be connected to the address bus

Explain in words how the chips are to be connected to the address bus. Thank You. Please Explain your answer, will help a lot.

  What protocol unit is being used in layer 2

Network switches provide essential connectivity in local and wide area networks. Some of them run in multilayer between layers 2 and 3. What protocol unit is being used in layer 2?

  Define a class called month that is an abstract data type

Embed your class definition in a test program. I dont get the meaning of test program what am i supposed to do in this assignment?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd