Write a class named Patient that has member variables for first name, middle name, last name, phone number, name and phone number of emergency contact. The Patient class should have a constructor that accepts and argument for each member variable. The Patient class should also have accessor and mutator functions for each member variable.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

 Write a class named Patient that has member variables for first name, middle name, last name, phone number, name and phone number of emergency contact. The Patient class should have a constructor that accepts and argument for each member variable. The Patient class should also have accessor and mutator functions for each member variable.

          Write a class named Procedure that has member variables for name of procedure, date of procedure, name of physician, and charges for the procedure. This Procedure class represents a medical procedure that is performed on a patient. The Procedure class should have a constructor that accepts an argument for each member variable. The Procedure class should also have accessor and mutator functions for each member variable.

          Then write a program that creates an instance of the Patient class initialized with sample data that is entered by the user.

          Then, create an instance of the Procedure class for each procedure that is being performed on the patient. There can be multiple procedures that can be performed on each patient. At the end of the data entry for a patient, display the patient’s information, information about the procedure/s and the total charges for the patient.

I am studying in java class. So I need to write the program by java. In the photos are how my professor show me created class Patient and Procedure .  Thanks 

public class Procedure {
String name0fProcedure;
String dayofProcedure;
String name0fPhysician;
String chargesForTheProcedure;
/**
* @param name0fProcedure
* @param day0fProcedure
* @param name0fPhysician
* @param chargesForTheProcedure
*/
public Procedure(String name0fProcedure, String day0fProcedure, String n
String chargesForTheProcedure) {
this.name0fProcedure = name0fProcedure;
this.day0fProcedure =
this.name0fPhysician = name0fPhysician;
this.chargesForTheProcedure = chargesForTheProcedure;
}
dayofProcedure;
public String getNameOfProcedure() {
return name0fProcedure;
}
public String getDayofProcedure() {
return dayofProcedure;
}
public String getName0fPhysician() {
return name0fPhysician;
}
public String getChargesForTheProcedure() {
return chargesForTheProcedure;
}
public void setName0fProcedure(String name0fProcedure) {
this.name0fProcedure = name0fProcedure;
}
public void setDayofProcedure(String day0fProcedure) {
this.davofProcedure = dav0fProcedure:
Transcribed Image Text:public class Procedure { String name0fProcedure; String dayofProcedure; String name0fPhysician; String chargesForTheProcedure; /** * @param name0fProcedure * @param day0fProcedure * @param name0fPhysician * @param chargesForTheProcedure */ public Procedure(String name0fProcedure, String day0fProcedure, String n String chargesForTheProcedure) { this.name0fProcedure = name0fProcedure; this.day0fProcedure = this.name0fPhysician = name0fPhysician; this.chargesForTheProcedure = chargesForTheProcedure; } dayofProcedure; public String getNameOfProcedure() { return name0fProcedure; } public String getDayofProcedure() { return dayofProcedure; } public String getName0fPhysician() { return name0fPhysician; } public String getChargesForTheProcedure() { return chargesForTheProcedure; } public void setName0fProcedure(String name0fProcedure) { this.name0fProcedure = name0fProcedure; } public void setDayofProcedure(String day0fProcedure) { this.davofProcedure = dav0fProcedure:
public class Patient {
String firstName;
String middleName;
String lastName;
String phoneNumber;
String emerContName;
String emerContPhoneNumber;
/**
* @param firstName
* @param middleName
* @param lastName
* @param phoneNumber
* @param emerContName
* @param emerContPhoneNumber
*/
public Patient (String firstName, String middleName, String lastName, Str
String emerContPhoneNumber) {
this.firstName = firstName;
this.middleName = middleName;
this. lastName = lastName;
this.phoneNumber = phoneNumber;
this.emerContName = emerContName;
this. emerContPhoneNumber = emerContPhoneNumber;
}
public String getFirstName () {
return firstName;
}
public String getMiddleName ( ) {
return middleName;
}
public String getLastName () {
return lastName;
}
public String getPhoneNumber() {
return phoneNumber;
}
Transcribed Image Text:public class Patient { String firstName; String middleName; String lastName; String phoneNumber; String emerContName; String emerContPhoneNumber; /** * @param firstName * @param middleName * @param lastName * @param phoneNumber * @param emerContName * @param emerContPhoneNumber */ public Patient (String firstName, String middleName, String lastName, Str String emerContPhoneNumber) { this.firstName = firstName; this.middleName = middleName; this. lastName = lastName; this.phoneNumber = phoneNumber; this.emerContName = emerContName; this. emerContPhoneNumber = emerContPhoneNumber; } public String getFirstName () { return firstName; } public String getMiddleName ( ) { return middleName; } public String getLastName () { return lastName; } public String getPhoneNumber() { return phoneNumber; }
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education