Application in the java programming language

Assignment Help JAVA Programming
Reference no: EM132085697

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

Verified Expert

This is a moderate level java program which deals with the concept of OOPs (object oriented programming) via Class concept. This coding used inheritance, polymorphism, data encapsulation like OOPS concept. This program was to implement a rental property system which is having two variant Apartment and Premium Suit. Each is the derived class from rental property class. Various method were implemented like rent, maintenance, creation of new rental property. Various levels of user data validation were also implemented.

Reference no: EM132085697

Questions Cloud

Importance of being earnest : Compare the film and written versions of "The Importance of Being Earnest". How true is the film to the play? Provide examples to show similarities
Write a one-page request for a proposal : Explain the project's goals and indicate why you included the requirements, time frames, and necessary tasks that you did.
Define and describe your variables : Define and describe your variables (no need to include in final write-up, but you may include this in an Appendix) - Find data to test your hypothesis
Should we use reference counters or mark-and-sweep : We may be able to solve this problem by implementing garbage collection on the tombstones.
Application in the java programming language : COSC1295 Advanced Programming - write a console application in the Java programming language which allows a company called FlexiRent to manage the renting
How much of an area to leave uncut : One problem in timber management is to determine how much of an area to leave uncut so that the harvested area is reforested in a certain period of time.
How does the old woman mixed-class origin : How does the old woman's mixed-class origin (i.e., mother is a commoner, father a middle-ranking aristocrat) impact on her role in life?
Synopsis of the story from the book of job from the bible : Describe what its lesson is, then compare and contrast Salieri and Job from the Bible. How are they alike? How are they different?
What are some of the social and political issues : What are some of the social and political issues that might inspire satirists Today? Give reasons for your choices.

Reviews

inf2085697

11/1/2018 1:58:37 AM

Thank you for the quick delivery! I am already reading through, so I will let you know if any correction is needed. I will review it to let you know if it's okay or not. I hope my teacher will be satisfied with the assignment this time prepared by your team as it seems very good and I'm personally getting fed up of requesting for the modification every time with other sites. GREAT JOB. thank you again!!

Write a Review

JAVA Programming Questions & Answers

  Discuss about the post given below

Create three classes: Car, NewCar, and UsedCar, where NewCar and UsedCar inherit Car. The class Car should have the following fields: model, price, and year. The class NewCar should have the String field color; the class UsedCar has the boolean va..

  Create class to encapsulate the data and behavior of product

Create a class to encapsulate the data and behavior of a product in a store's inventory. The class should have the following data for an inventory item.

  Create a webpage that prints

Write a programme to create a webpage that prints the name of the STUDENT database in Wide Latin font and set the subtitle with description of the STUDENT to the screen. Set the page layout to the webpage.

  Length of the string in order to reserve space

To determine the length of the string in order to reserve space for the new string use the library routine strlen. Register a1 contains a pointer to the string to measure and on return register a1 has the number of characters in the string. You..

  Write a recursive method that takes two non-negative integer

Write a recursive method that takes two non-negative integers m and n as parameters and returns the product.

  Write a complete java program called scorer

Write a complete Java program called Scorer that declares a 2-dimensional array of doubles called scores with three rows and three columns. Use a nested while loop to get the nine (3 x 3) doubles from the user at the command line. Finally, use a nest..

  Why are control structures needed in a program

Discussion Question: Why are control structures needed in a program? Describe the benefits of breaking up a program into small modules

  Create a class diagram that shows an interface

Create a class diagram that shows an interface called Buyer in the Violet UML editor. This interface should declare the methods to perform a buyer's responsibilities

  Develop a program that plays "five card stud"

Develop a program that plays "Five Card Stud". The user plays agains the computer. The program will "deal" five cards to the user and itself. Whoever has the highest hand wins. Inform the user who has won that hand, and ask if the user wants to pl..

  1 ra row your boatprepare a world with a boat a person

1. ra row your boatprepare a world with a boat a person sitting in the boat an island and a pier located 25 meters from

  What are the limits for each one of these indexes

What are the limits for each one of these indexes and is it possible to model a 2-dimensional array with a single-dimensional array?

  Create java applet to represent grade of gas

Write a java applet (not a java application program) for costco gas station. The applet will first ask you whether you are a costco customer, then the grade of gas you want to use.

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