Liverpool John Moores University - Hotel Tax System Java Program

Verified

Added on  2019/09/22

|6
|1286
|75
Homework Assignment
AI Summary
This assignment focuses on developing a console application in Java for a hotel tax system. The system reads room data from a file, allowing managers to specify a custom tax rate or use a default. It calculates income and tax for each room type based on bookings and room prices, displaying the results on the screen. The application includes features for input validation, output formatting, and running totals for income and tax. The solution incorporates best practices for code structure, including comments, indentation, and variable naming conventions. The coursework assesses core programming concepts such as constants, variables, input/output operations, selection statements (if/else), and iterative statements (while/for loops). This assignment aims to provide students with practical experience in applying fundamental programming principles to solve a real-world problem, providing a comprehensive understanding of the Java programming language.
tabler-icon-diamond-filled.svg

Contribute Materials

Your contribution can guide someone’s learning journey. Share your documents today.
Document Page
Faculty of Engineering & Technology
Department of Computer Science
Coursework Title: Hotel Tax System
Module Name: Introduction to Computer Programming
Module Code: 4100COMP
Level: 4
Credit Rating: 20
Weighting: 40%
Maximum Mark Available: 100
Lecturer: Dr. Denis Reilly
Contact: If you have any issues with this coursework you may contact your lecturer (the
academic who delivers your lectures), if there are any outstanding issues you may
contact the module co-ordinator whose contact details are:
eMail: d.reilly@ljmu.ac.uk
Room: 731
Hand-Out Date: 17th Oct 2016
Hand-In Date: 11th Nov 2016
Hand-In Method: BlackBoard
FeedBack Date: 2nd Dec 2016
FeedBack Method: eMail
Programme(s): CS, CSc, SE, MC, CF, CSe
Introduction:
This coursework is to be attempted individually.
You are required to apply basic computer programming concepts and techniques to solve a
computing problem. The coursework is supported by tutorial sessions up to the submission
date.
Learning Outcome(s) Being Assessed:
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
1. Apply knowledge of programming constructs and basic algorithms.
2. Demonstrate problem solving skills by producing simple programming solutions.
3. <not assessed in this coursework>
4. <not assessed in this coursework>
5. <not assessed in this coursework>
Details of Task:
A new hotel tax system is required to help managers determine how much tax they must pay
calculated by the number of bookings multiplied with the room price for different room types.
Every time the system runs, the tax rate may be specified by the managers or set to a suitable
default. You are thusly required to produce a console application (using Java) that is ready to
open the file M:\data\rooms.txt which contains the room’s data.
NOTE : The rooms.txt file (i.e. Appendix A) is provided on BlackBoard in the Assignments
section.
You should download the file to a new folder called data on your M: drive.
It contains three sample rooms. The format of each room’s data is as follows :
room type
number of bookings
room price
Upon application launch, the system should ask the managers if they wish to specify a custom
tax rate, this should be in the form of a yes / no question. When the managers say yes, the
system should request the tax rate as input (from the keyboard) which will then overwrite the
default tax rate (i.e. Appendix B). When the managers say no, the system should report (to the
screen) the default tax rate (i.e. Appendix C). Next, the system should loop through the room’s
data, calculating and printing (to the screen) the room type, number of bookings, room price,
income and tax, the latter two requiring some basic calculations.
Running totals for the income and tax should be calculated and printed before the system
gracefully exits.
What you should hand in:
The properly formatted & commented code in a ZIP file. Specifically, a single Java (.java) file.
Instructions will be provided on how to use Blackboard Assignment Handling.
Document Page
Marking Scheme/Assessment Criteria:
Assessment Assessment Criteria
% weighting for
part
1 Solution’s Functionality
Constants & Variables
Reading Input
Formatting Output
if, if-else Statements
while, for Statements
10
20
20
15
15
80
2 Best Practice 10
3 Commenting 10
Guidelines:
It is not necessary to develop your system outside the specification above, marks are
available for answering the question, the whole question and nothing but the question, that
said see below regarding best practice.
This coursework is explicitly assessing the following aspects of programming:
o Constants & Variables (int, double & string)
o Reading Input (from keyboard & files).
o Formatting Output (to screen).
o Selection Statements (if, if-else).
o Iterative Statements (while, for).
The code should employ best practice (i.e. indentation, spacing & camelCase).
The code should also be suitably commented (i.e. non self-explanatory).
Resources Required:
You may use the computing labs on the 6th & 7th floors of the Byrom Street Campus as well as
the 1st floor of the Henry Cotton Campus.
You should make use of these specific tools & resources: Eclipse (Neon).
Lecture Materials.
Document Page
The Internet.
Malik’s Java Book.
Extenuating Circumstances:
If something serious happens that means that you will not be able to complete this assignment,
you need to contact the module leader as soon as possible. There are a number of things that
can be done to help, such as extensions, waivers and alternative assessments, but we can only
arrange this if you tell us. To ensure that the system is not abused, you will need to provide
some evidence of the problem.
More guidance is available at:
https://www.ljmu.ac.uk/about-us/public-information/student-regulations/guidance-policy-
and-process
Any coursework submitted late without the prior agreement of the module leader will receive 0
marks.
Academic Misconduct:
The University defines Academic Misconduct as ‘any case of deliberate, premeditated cheating,
collusion, plagiarism or falsification of information, in an attempt to deceive and gain an unfair
advantage in assessment’.
This includes attempting to gain marks as part of a team without making a contribution. The
Faculty takes Academic Misconduct very seriously and any suspected cases will be investigated
through the University’s standard policy
(https://www.ljmu.ac.uk/about-us/public-information/student-regulations/appeals-and-
complaints).
If you are found guilty, you may be expelled from the University with no award.
It is your responsibility to ensure that you understand what constitutes Academic Misconduct
and to ensure that you do not break the rules. If you are unclear about what is required, please
ask.
For more information you are directed to following the University web pages:
Information regarding academic misconduct:
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
https://www.ljmu.ac.uk/about-us/public-information/student-regulations/appeals-and-
complaints
Information on study skills:
https://www2.ljmu.ac.uk/studysupport/
Information regarding referencing:
https://www2.ljmu.ac.uk/studysupport/69049.htm
Appendix A
Single
5
23.50
Double
3
27.50
Suite
2
50.00
Appendix B
- - Hotel Tax System - -
Specify Custom Tax Rate [Y|N] : Y
Specify Tax Rate (%) : 17.5
Room Type : Single, Bookings : 5, Room Price : £23.50, Income : £117.50, Tax : £20.55
Room Type : Double, Bookings : 3, Room Price : £27.50, Income : £82.50, Tax : £14.44
Room Type : Suite, Bookings : 2, Room Price : £50.00, Income : £100.00, Tax : £17.50
Total Income : £300.00
Tax Payable : £52.50
Appendix C
- - Hotel Tax System - -
Document Page
Specify Custom Tax Rate [Y|N] : N
Assuming Tax Rate = 20.0%
Room Type : Single, Bookings : 5, Room Price : £23.50, Income : £117.50, Tax : £23.50
Room Type : Double, Bookings : 3, Room Price : £27.50, Income : £82.50, Tax : £16.50
Room Type : Suite, Bookings : 2, Room Price : £50.00, Income : £100.00, Tax : £20.00
Total Income : £300.00
Tax Payable : £60.00
chevron_up_icon
1 out of 6
circle_padding
hide_on_mobile
zoom_out_icon
logo.png

Your All-in-One AI-Powered Toolkit for Academic Success.

Available 24*7 on WhatsApp / Email

[object Object]