Convincing Features
Assignment Type
Subject
Uploaded by Malaysia Assignment Help
Date
Introduction decision constructs, and looping constructs.
The main objectives of this assignment are to:
1. Apply numerical computation and expressions to
calculate hospital stay duration and total charges.
2. Use decision constructs (if-else, nested if) to handle
different billing conditions.
3. Implement looping constructs (while / for / do-while) to
process multiple patient bills.
4. Display patient billing details in a structured and
readable format.
The Hospital Billing System will:
1. Allow the user to input patient ID, patient name,
admission day (in int type), and discharge day (in int
type).
2. Calculate length of stay (duration) using arithmetic
expressions based on the admission day and discharge
day. The charge for a standard room is RM120.00 per
day. Calculate the total charge.
3. Apply decision logic to:
o Validate input (e.g., discharge day earlier than
admission day β invalid record).
o Apply a 15% discount if stay duration exceeds 7
days.
o Assign RM 0.00 if stay duration β€ 0.
4. The final charge is calculated by deducting the eligible
discount from the total charge for stays of more than 7
days. Otherwise, no discount is applied.
5. Use a loop to allow multiple patient billing records until
the operator chooses to stop.
6. At the end of the program, when the operator stops
calculating the patient bills, the system will display the
total final charges accumulated from all patient records.
7. Display each patient bill and the total hospital charges
collected at the end.
==================================================
HOSPITAL BILLING SYSTEM
==================================================
Enter Patient ID : HSP3456
Enter Patient Name : Ahmad Ali
Enter Admission Day : 3
Enter Discharge Day : 10
————————————————–
Patient ID : HSP3456
Patient Name : Ahmad Ali
Admission Day : Day 3
Discharge Day : Day 10
Length of Stay : 7 day(s)
Total Charge : RM840.00
Discount : RM0.00
Final Charge : RM840.00
————————————————–
Do you want to process another patient? (Y/N): Y
Enter Patient ID : HSP6789
Enter Patient Name : Siti Aminah
Enter Admission Day : 2
Enter Discharge Day : 12
————————————————–
Patient ID : HSP6789
Patient Name : Siti Aminah
Admission Day : Day 2
Discharge Day : Day 12
Length of Stay : 10 day(s)
Total Charge : RM1200.00
Discount : RM180.00
Final Charge : RM1020.00
————————————————–
Do you want to process another patient? (Y/N): N
The total of final charge = RM 1860.00
Thank you for using the Hospital Billing System!
You are required to:
1. Develop a complete Java program that implements the
Hospital Billing System as described above.
o Use the meaningful variables and constants
appropriately according to naming convention rule.
o Include arithmetic expressions for computation.
o Apply decision constructs to handle logic and
validation.
o Use a loop structure (for/while/do-while) to allow
repeated transactions.
o Display all output in a clear tabular format.
2. Apply the concept of indentation. Then, include
comments in the program to explain major sections such
as input information, calculation, information display etc.
3. Follow the attached Assignment 2 rubric for the
assessment.
4. Test the program with at least three sample records and
display the output.
5. Submit:
o Source code file (HospitalBillingSystem.java)
o Screenshot of program output
Struggling to complete your STTPK1013 Introduction to Programming and Problem Solving β Hospital Billing System assignment? Many students find Java decision structures, loops, and billing calculations confusing under tight deadlines. Our Malaysia Assignment help team provide you build a fully working Java program with correct logic, clean indentation, and rubric-aligned output. From validating admission/discharge days to applying discounts and loops for multiple patients, we handle it all accurately. Get human-written, well-commented Java source code plus tested outputs. Choose trusted programming assignment helper serviceΒ and submit your assignment with confidence.