Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

For this assignment you need to write a console application in the Java programming language which allows a company called FlexiRent to manage the renting and maintenance of various types of rental apartments in Melbourne CBD. Unlike traditional hotels, FlexiRent offers stylish 1, 2, and 3-bedroom Apartments and Premium Suites for short-term stays in Melbourne.

Rental Property

Each rental property managed by FlexiRent has the following attributes:

Property id: a string which uniquely identifies each rental property, the id should start with A_ if the property is an apartment and S_ if the property is a Premium Suite

Example of an Apartment ID: A_700BSMEL for 700 Bourke Street, Melbourne

Example of a Premium Suite ID: S_633WMSB for 633 Whiteman Street, Southbank

Note: You are free to use your own format, as long as each rental property is uniquely identified and an Apartment id starts with A_ and a Premium Suite id starts with S_

Street number

Street name

Suburb

Number of bedrooms of the property

Property type: FlexiRent currently has two types of rental properties; Apartment and Premium Suite, whose different details are shown further down

Property status: employees of FlexiRent will inspect this attribute to determine whether the property is currently available for rent or being rented or under maintenance

Furthermore, each rental property also keeps its own collection of Rental Records. These store information about the 10 most recent times that property has been rented.

Rental Record

Each Rental Record has the following attributes:

Record id: a string which uniquely identifies each rental record. A rental record id is constructed by concatenating the following three attributes

propertyId_ + customerId_ + rentDate (8 digit format: ddmmyyyy)

Note: In Assignment 1, each customer is simply represented by a unique string of customer id of your choice. There is no need to implement a class to store customer information.

Rent date: the date when a customer rents the property

Source code of the DateTime.java is provided to you. Please click here to access the code.

Estimated return date: the calculated date given the number of days a customer wants to rent the property (provided when a customer wants to rent that property) and the rent date shown above

Example: a customer wants to rent a property on 14/07/2018 for 3 days, hence the estimated return date will be 17/07/2018

Actual return date: the date when the customer actually returns the property

Rental fee: the fee calculated based on the type of property, the rent date and the estimated return date.

Late fee: the additional fee which must be calculated when the actual return date is after the estimated return date

Note: Apartment and Premium Suite have different formulae to calculate rental fee and late fee, which will be shown further down

Apartment

As mentioned above, FlexiRent has two types of properties for short-term rental. The first type is Apartment, which has the following characteristics:

Each Apartment can have 1, 2 or 3 bedrooms

Each Apartment can be rented for:
a minimum of 2 days if the rental day is between Sunday and Thursday inclusively
or a minimum of 3 days if the rental day is Friday or Saturday
and a maximum of 28 days

Apartment type has the following rental rates:
$143 per day for a 1-bedroom apartment
$210 per day for a 2-bedroom apartment
$319 per day for a 3-bedroom apartment

If an Apartment is returned earlier than the estimated return date, there is no additional fee applied and the rental fee is calculated based on the rent date and the date the Apartment is returned (actual return date)

About late fee:

If an Apartment is returned later than the estimated return date, then the rental rate of each late day is 115% of the normal daily rate for that Apartment type. For example, a 1-bedroom Apartment has a daily rate of $143 as shown above. Therefore the rental rate of each late day is 115% of 143 = 115/100 * 143 = $164.45

An Apartment has no fixed maintenance schedule. FlexiRent can perform maintenance on an Apartment at any time that there is no customer renting the Apartment

Premium Suite

The second type of rental property FlexiRent offers for short-term rent is called Premium Suite. It is even more spacious, with an excellent view of Melbourne CBD. Each Premium Suite has the following characteristics:

Each Premium Suite always has 3 bedrooms

Each Premium Suite can be rented for a minimum of 1 day

The rental rate of a Premium Suite is $554 per day

About late fee: if an Apartment is returned after the estimated return date, then the late fee is calculated at $662 per day

Each Premium Suite has a strict maintenance schedule because FlexiRent wants all their suites to be in the best possible conditions. Therefore they specify the following requirements:

All Premium Suites must have a maintenance interval of 10 days.

Each Premium Suite must keep its last maintenance date. Maintenance operations for a suite must be done no more than 10 days (as specified by the maintenance interval above) after its last maintenance date.

Customers will not be allowed to rent a suite for a time period which exceeds the date on which maintenance operation must be done.

Example: a Premium Suite is available and last underwent maintenance on 15/07/2018. Maintenance must be done for that suite no later than 25/07/2018. Therefore, if a customer wants to rent that suite on 21/07/2018 for 5 days, the FlexiRent system will reject that request.

Implementation Requirements

General Implementation Requirements

Although you are not required to use more than one class per task, you are required to modularise classes properly. No method should be longer than 50 lines.
You should aim to provide high cohesion and low coupling.
You should aim for maximum encapsulation and information hiding.
Your coding style should be consistent with Java coding conventions

You should comment important sections of your code remembering that clear and readily comprehensible code is preferable to a comment.
It is not necessary to use dynamic data structures to store the input data (i.e. it is fine to define a fixed size data structure taking into account the maximum possible amount of input data).
Your programs will be marked with Java SE 8.0. Make sure you test your programs with this setting before you make the submission.

Main Implementation Requirements
Your Rental Record class must meet the following requirements:

Override the public String toString() method to return a string containing the details of a rental record in the following format:

recordId:rentDate:estimatedReturnDate:actualReturnDate:rentalFee:lateFee

(notice how the colon is used as a separator)

Implement a public String getDetails() method. This method should build a string and return that string. The returned string should be formatted in a human readable form as shown below. This method SHOULD NOT do the actual printing to the console.

Attachment:- Assignment.rar

Java, Programming

  • Category:- Java
  • Reference No.:- M93073170
  • Price:- $50

Priced at Now at $50, Verified Solution

Have any Question?


Related Questions in Java

Assessment socket programmingtaskwrite a java gui program

Assessment: Socket Programming Task Write a JAVA GUI program that would facilitate text chatting/exchanging between two or multiple computers over the network/internet, using the concept of JAVA socket programming. If yo ...

Solving 2nd degree equationsbull write the following java

Solving 2nd degree equations • Write the following Java methods • boolean real-sols(double a, double b, double c): it returns true if the 2nd degree equation ax2 + bx + c has real solutions • double solution1(double a, d ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

Project requirementsfor the problem described in the next

Project requirements For the problem described in the next section, you must do the following: 1. include your student ID at the end of all filenames for all java code files. Three classes have been identified in section ...

Assessment instructionsin this assessment you will complete

Assessment Instructions In this assessment, you will complete the programming of two Java class methods in a console application that registers students for courses in a term of study. The application is written using th ...

Assessment database and multithread programmingtasktask 1

Assessment: Database and Multithread Programming Task Task 1: Grade Processing University grading system maintains a database called "GradeProcessing" that contains number of tables to store, retrieve and manipulate stud ...

Assessment -java program using array of Assessment -JAVA Program using array of objects

Assessment -JAVA Program using array of objects Objectives This assessment item relates to the course learning outcomes as stated in the Unit Profile. Details For this assignment, you are required to develop a Windowed G ...

Applied software engineering assignment 1 -learning

Applied Software Engineering Assignment 1 - Learning outcomes - 1. Understand the notion of software engineering and why it is important. 2. Analyse the risk factors associated with phases of the software development lif ...

Assignment - method in our madnessthe emphasis for this

Assignment - "Method in our Madness" The emphasis for this assignment is methods with parameters. In preparation for this assignment, create a folder called Assign_3 for the DrJava projects for the assignment. A Cityscap ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As