Find the Bugs // A Patient class is used by a doctor\'s office. // The Patient c
ID: 3536560 • Letter: F
Question
Find the Bugs // A Patient class is used by a doctor's office.
// The Patient class has two overloaded constructors:
// 1) a default constructor,
// 2) one that requires an ID number, first and last name.
// A demonstration program declares two Patient objects
// and displays each patient's data fields.
Classstart
Declarations
Patient patient1()
Patient patient2("234", "Lee", "Lydia")
patient1.display()
patient2.display()
stop
class Patient
Declarations
private string idNum
private string lastName
private string firstName
public Patient()
idNum = "0000"
lastName = "XXXX"
firstName = "XXXX"
return
public Patient(string id, string last, string first)
idNum = idNum
last = last
firstName = first
return
public void display()
output "Patient #", id, lastName, firstName
return
end
Explanation / Answer
Answer question
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.