
Concept explainers
Patient Charges
Write a class named Patient that has fields for the following data:
- First name, middle name, and last name
- Address, city, state, and ZIP code
- Phone number
- Name and phone number of emergency contact
The Patient class should have a constructor, accessor, and mutator that accept an argument for each field.
Next, write a class named Procedure that represents a medical procedure that has been performed on a patient. The Procedure class should have fields for the following data:
- Name of the procedure
- Date of the procedure
- Name of the practitioner who performed the procedure
- Charges for the procedure
The Procedure class should have a constructor, accessor, and mutator that accept an argument for each field.
Next, write a
Procedure #1: | Procedure #2: | Procedure #3: |
Procedure name: | Procedure name: X-ray | Procedure name: Blood test |
Physical Exam | Date: Today’s date | Date: Today’s date |
Date: Today’s date | Practitioner: Dr. Jamison | Practitioner: Dr. Smith |
Practitioner: Dr. Irvine | Charge: 500.00 | Charge: 250.00 |
Charge: 200.00 |
The program should display the patient’s information, information about all three of the procedures, and the total charges of the three procedures.

Want to see the full answer?
Check out a sample textbook solution
Chapter 3 Solutions
Starting Out with Java: Early Objects (6th Edition)
Additional Engineering Textbook Solutions
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Starting Out with Python (4th Edition)
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
SURVEY OF OPERATING SYSTEMS
Starting Out with C++ from Control Structures to Objects (9th Edition)
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageEBK JAVA PROGRAMMINGComputer ScienceISBN:9781305480537Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT




