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:

  1. Show the encapsulated variables patient Name, social, dateOfBirth, address, illness
  2. Build your Getters and Setters for illness.
  3. Show a payment method that will add a payment to the patient.
  4. Show a payment method that gets all the payments for the patient. So all the bills.
  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 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
  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).

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!