Problem Solving with C++ (10th Edition)
Problem Solving with C++ (10th Edition)
10th Edition
ISBN: 9780134448282
Author: Walter Savitch, Kenrick Mock
Publisher: PEARSON
Question
Book Icon
Chapter 15, Problem 4PP
Program Plan Intro

Creation of program to create and display billing records for patients

Program Plan:

  • Define a class “person” to define methods and operations in it.
    • Define a constructor “person()” to create new instance of a person.
    • Define a method “getName()” to get name of person.
    • Define a method “operator=()” to define operation for “=” operator.
    • Define a method “operator>>()” to define operation for “>>” operator.
    • Define a method “operator<<()” to define operation for “<<” operator.
  • Define a class “doctor” to define methods and operations in it.
    • Define a constructor “doctor()” to create new instance of a doctor.
    • Define a method “gtDctr()” to get name of doctor.
    • Define a method “gtDsgntn()” to get designation of doctor.
    • Define a method “operator=()” to define operation for “=” operator.
  • Define a class “patient” to define methods and operations in it.
    • Define a constructor “patient()” to create new instance of a patient.
    • Define a method “getPtnt()” to get name of patient.
    • Define a method “gtDctr()” to get name of doctor.
    • Define a method “gtDsgntn()” to get designation of doctor.
    • Define a method “operator=()” to define operation for “=” operator.
  • Define a class “billing” to define methods and operations in it.
    • Define a constructor “billingt()” to create new instance of billing.
    • Define a method “getPtnt()” to get name of patient.
    • Define a method “gtDctr()” to get name of doctor.
    • Define a method “gtDsgntn()” to get designation of doctor.
    • Define a method “gtBill()” to get bill for patient.
    • Define a method “operator=()” to define operation for “=” operator.
  • Define a main method
    • Create instance for “doctor”, “patient” and “billing” classes.
    • Call methods in classes to perform specific operations.
    • Display the result.

Blurred answer
Students have asked these similar questions
Write a class named Person with data attributes for a person’s name, address, and telephone number. Next, write a class named Customer that is a subclass of the Person class. The Customer class should have a data attribute for a customer number and a Boolean data attribute indicating whether the customer wishes to be on a mailing list. Demonstratean instance of the Customer class in a simple program.
NOTE: READ CAREFULLY   Design a class named Person and a subclasses named Employee. Make Teacher a subclass of Employee.   A Person has a name, address, and e-mail address. An Employee has an office, salary.   A Teacher has office hours and a subject they teach. They also have a tenure status. Define the tenure status as a constant. The tenure status is either Senior or Junior, and is represented as an integer, where Senior is equal to 1, and Junior is equal to 2.   Each class should have a Default constructor, and a constructor that accepts all arguments. There should be appropriate calls to the superclass within the constructors.   Each class should also have getters and setters for each member variable.   Each class should have a toString method.   Note: You do NOT need to run this in a test program. Just create the classes as indicated above.
Design and implement java program for " Covenant System"; the system stores a covenant name, type and date for each object. Also, each Covenant should have the employee name and ID. The system contains a Covenant class and TestCovenant class. To implement the class, you must: (not exclusively)Make at least one constructor to initialize the object with a Date object and ID.Each private data must have setter and getter method.In the main class you have to create 5 Covenants objects and assign for each object its (name, id, datecreated, Employee name, Employee ID). Submit UML class diagram

Chapter 15 Solutions

Problem Solving with C++ (10th Edition)

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