Question
Description: This activity help you differentiate between objects, classes and constructors. You will have to complete the Patient and Payment classes. Please follow the steps
Description:
This activity help you differentiate between objects, classes and constructors. You will have to complete the Patient and Payment classes. Please follow the steps below:
Steps:
- Show the encapsulated variables patient Name, social, dateOfBirth, address, illness
- Build your Getters and Setters for illness.
- Show a payment method that will add a payment to the patient.
- Show a payment method that gets all the payments for the patient. So all the bills.
- You are a receptionist welcoming a new patient show a new patient taking in patient name and the social security number. Use the name John and the social security number of 12345.
- You are a doctor diagnosing your patient above set the patients illness. Set John's ilness to "cold"
- You are the billing agent who will add the payment to the patient you created. Show a Payment object that will take in the amount the patient owes, and their Date of Birth. Use these values: 99.95, "June 15 2021
- Add payments to your patient (John) for billing purposes.
- Now send the payment to john (just print it so he can see)
- Get all payments due to patient (John).
Test:
Use the test provided.
Sample output: Date: June 15 2021. The amount due is 99.95Patient JohnThe following are the payments due Date: June 15 2021. The amount due is 99.95The total amount due is 99.95
class Main { public static void main(String[] args) {
// 5. You are a receptionist welcoming a new patient show a new patient taking in patient name and the social security number. Use the name John and the social security number of 12345. // 6. You are a doctor diagnosing your patient above set the patients illness. Set John's ilness to "cold" // 7. You are the billing agent who will add the payment to the patient you made. Show a Payment object that will take in the amount the patient owes, and their Date of Birth. Use these values: 99.95, "June 15 2021". // 8. Add payments to your patient (John) for billing purposes. // 9. Now send the payment to john (just print it so he can see) // 10. Get all payments due to patient (John).
}}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started