STTPK1013 Introduction to Programming and Problem Solving Assignment 2

School

Universiti Utara Malaysia (UUM)

*We aren't endorsed by this school

Assignment Type

Individual Assignment

Subject

STTPK1013 Introduction to Programming and Problem Solving

Uploaded by Malaysia Assignment Help

Date

12/23/2025

A251 STTPK1013 CASE STUDY: HOSPITAL BILLING SYSTEM

Introduction decision constructs, and looping constructs.

Objective

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.

πŸ’‘ Want Full-Marks Solution for STTPK1013 Hospital Billing System Case Study?

System Description

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.

Expected Output

==================================================
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!

Student Task Requirements

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 with STTPK1013 Introduction to Programming and Problem Solving Assignment 2?

Get Help By Expert

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.

Answer

UP TO 15 % DISCOUNT

Instant Paper Writing Services by Native Malaysia Writers

Plagiarism Free Solutions
100% Original Work
24*7 Online Assistance
Native PhD Experts
Hire a Writer Now
Convincing Features
STTPK1013 Introduction to Programming and Problem Solving Assignment 2
Plagiarism Free Report
On-Time Delivery
Native Writers
A+ Quality
100% Confidential
24*7 Online Assistance

Get these features included in Your Assignment

Facing Issues with Assignments? Talk to Our Experts Now!Download Our App Now!

Have Questions About Our Services?
Download Our App!

Get the App Today!

QRcode

Get Assistance for Assignments, online Exam, and Projects Writing