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
What is a functional decomposition diagram? what is a good example of a high level task being broken down into tasks in at least two lower levels (three levels in all).
What are the advantages to using a Sytems Analysis and Design model like the SDLC vs. other approaches?
3. Problem Description: Define the Circle2D class that contains: Two double data fields named x and y that specify the center of the circle with get methods. • A data field radius with a get method. • A no-arg constructor that creates a default circle with (0, 0) for (x, y) and 1 for radius. • A constructor that creates a circle with the specified x, y, and radius. • A method getArea() that returns the area of the circle. • A method getPerimeter() that returns the perimeter of the circle. • • • A method contains(double x, double y) that returns true if the specified point (x, y) is inside this circle. See Figure (a). A method contains(Circle2D circle) that returns true if the specified circle is inside this circle. See Figure (b). A method overlaps (Circle2D circle) that returns true if the specified circle overlaps with this circle. See the figure below. р O со (a) (b) (c)< Figure (a) A point is inside the circle. (b) A circle is inside another circle. (c) A circle overlaps another…

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
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning