Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions