Look at the following description of a problem domain:
A doctor sees patients in her practice. When a patient comes to the practice, the doctor performs one or more procedures on the patient. Each procedure performed has a description and a standard fee. As patients leave, they receive a statement that shows their name and address, as well as the procedures that were performed and the total charge for the procedures.
Assume that you are creating an application to generate a statement that can be printed and given to the patient.
A.) Identify all of the potential classes in this problem domain.
B) Refine the list to include only the necessary class or classes for this problem.
C) Identify the responsibilities of the class or classes that you identified in step B.
Want to see the full answer?
Check out a sample textbook solutionChapter 7 Solutions
Starting Out with C++: Early Objects (9th Edition)
Additional Engineering Textbook Solutions
Starting Out with C++ from Control Structures to Objects (8th Edition)
Starting Out with Java: From Control Structures through Objects (6th Edition)
Artificial Intelligence: A Modern Approach
Programming in C
Java: An Introduction to Problem Solving and Programming (7th Edition)
Starting out with Visual C# (4th Edition)
- Please written by computer source Problem Description:(The Account class) Design a class named Account that contains:A private int data field named id for the account (default 0).A private string data filed named first name for customer first name.A private string data filed named last name for customer last name.A private double data field named balance for the account (default 0).A private double data field named annualInterestRate that stores thecurrent interest rate (default 0). Assume all accounts have the sameinterest rate.A private Date data field named dateCreated that stores the date whenthe account was created.A no-arg constructor that creates a default account.A constructor that creates an account with the specified id, firstname, last name and initial balance.The accessor and mutator methods for id, name, balance, andannualInterestRate.The accessor method for dateCreated.A method named getMonthlyInterestRate() that returns the monthlyinterest rate.A method named withdraw…arrow_forwardUsing C++ define the class called Student. The Student class has the following: Private data members: name(string), age(int), units(int). The units represent the number of quarter units student is enrolled in. Define a default constructor as well as a constructor with parameters for the class Student. The class must have get and set functions for all private data members. The set function for the data member units must throw “out_of_range” exception if the number of units is not between 1 and 15. Include a function called tuition (double feePerUnit) that computes and returns the cost of registering for the number of units (in the private data member). The function receives the cost per unit as a parameter. Overload the operator (<<) to display student name and age. Test the class Student by writing a main program in which a Student object is created and displayed. Call the function tution(), you may pass any value as feePerUnit parameter to this function and display the…arrow_forwardBook Donation App Create a book-app directory. The app can be used to manage book donations and track donors and books. The catalog is implemented using the following classes: 1. The app should have donors-repo.js to maintain the list of donors and allow adding, updating, and deleting donors. The donor object has donorID, firstName, lastName, and email properties. This module should implement the following functions: • getDonor(donorId): returns a donor by id. • addDonor(donor): adds a donor to the list of donors; donorID should be autoassigned a random number. • updateDonor(donor): updates the donor having the matching donorID. • deleteDonor(donorID): delete the donor with donorID from the list of donors, only if they are not associated with any books. 2. The app should have books-repo.js to maintain the list of donated books and allow adding, updating, and deleting books. The book object has bookID, title, authors, and donorID properties. • donorID references the book’s donor. This…arrow_forward
- Create a console-based application in C# called Farm Inventory App that meets the requirements below.1. Create a class and name it Farm.2. The Farm class must have the following properties:•Location as string•FarmSize as int•FarmCost as int3. Define two constructors in the Farm class.The first constructor receives no argument and sets default values to the properties (the default value for string is an empty string, and for int it's 0).The second constructor must receive and set the values for Location, Farmsize, and FarmCost as arguments. 4. Create a method named ShowFarminformation in the class to display the properties of the object.arrow_forwardIn Java code: Write course management program that allows professors to create course entries to the course library and student to manage course registration. Your program will present a menu with the following options: 1. Professor 1.1 creates a course 1.2 show all courses2. Student 2.1 views a course's details 2.2 enrolls in a course 2.3 drops a course 2.4 shows all enrolled courses3. Exit Follow these guidelines to define these classes 1. Professor Class Data fields: id, name, courses taught by the professor Constructors: several no-argument, multi-argument constructors Accessor methods that return the values of data fields: return name, courses Mutator methods that set the data fields, e.g, add/remove a course showCourses: list all the courses taught or created by the professor 2. Student Class Data fields: id, name, gpa, courses enrolled, etc. Constructors: several no-argument, multi-argument constructors Accessor methods that return the values of data fields:…arrow_forwardll data members must be declared as private. Global variables are not allowed. Constants are ok. There should be no usage of cin or cout in the method or in the class definition or required functions. They should be handled using parameters and return values. cin and cout can and should be used in the testing functions. There should be only one “return” statement in a function or method. Multiple return statements within the same function/method are not allowed. Please pay attention to the required data types in the description. tuple, list and vector classes are not allowed to be used in this exam. Please write C++ functions, class and methods to answer the following questions. 1. Define a new C++ class named “Exam” that manages simple exam information: student id (integer) and a score (integer) The class must provide at least the following two methods: • isPassing which will return a boolean: true if the score is >=60 and false otherwise • toString method that returns the string…arrow_forward
- You are working for a major car manufacturer and have been tasked with creating an application to maintain vehicle inventory records for one of its dealerships. Create a class to maintain a Dealership. A dealership has the following information that must be stored in the Dealership class: the dealership name, the maximum number of vehicles that the dealership’s lot can hold, and a vector of the vehicles currently on the lot. The information for each vehicle should be encapsulated in a Vehicle class and should include the vehicle’s make, model, and year. Your Dealership class should support operations (functions) to add a vehicle to the dealership’s inventory (vector) and to list all vehicle records (i.e. print out the make, model, and year of each vehicle object in the vector). Your Vehicle class should include operations to allow entry of the make, model, and year, and to return the values in these variables (In other words, you need a separate setter and getter for each data…arrow_forwardYou are working for a major car manufacturer and have been tasked with creating an application to maintain vehicle inventory records for one of its dealerships. Create a class to maintain a Dealership. A dealership has the following information that must be stored in the Dealership class: the dealership name, the maximum number of vehicles that the dealership’s lot can hold, and a vector of the vehicles currently on the lot. The information for each vehicle should be encapsulated in a Vehicle class and should include the vehicle’s make, model, and year. Your Dealership class should support operations (functions) to add a vehicle to the dealership’s inventory (vector) and to list all vehicle records (i.e. print out the make, model, and year of each vehicle object in the vector). Your Vehicle class should include operations to allow entry of the make, model, and year, and to return the values in these variables (In other words, you need a separate setter and getter for each data…arrow_forwardThe college that you attend requires an application that will print out a Course Report. You arerequired to create an application that will allocate the following course data: COURSE CODE COURSE NAME STUDENT NUMBERS LECTURER DISD Diploma in Software Development 35 Mr Jones DIWD Diploma in Web Development 28 Mrs Smith DIDM Diploma in data Metrics 39 Mr Ntsinga Create a class named Course_Details that will contain get and set methods for the course name,student numbers and lecturer. In the Course_Details class include a method called Assign Venuethat will randomly generate a Venue/Class for the course. Venues can be from 1 to 3 only. Yourmain class must include a static method to handle the printing of the course report Use java languagearrow_forward
- IIFEs are one way to prevent the pollution of the global namespace by creating functions and variables that will disappear after the IIFE has been invoked. True or False (Include valid reason)arrow_forwardThis is an object oriented programming question The code should be in C++ language. Design a class named Staff that includes A data member named staffID A setter function to initialize staffID A getter function to get the value of staffID Derive a class named Professor inherited from Staff class and contains Two additional data members i.e. departmentID and departmentName A parameterized constructor to initialize its own data fields along with the inherited data field Two getter functions that return the departmentID and departmentName, respectively Derive a class named VisitingProfessor inherited from class Professor and has A data field named no_of_courses A data field named salary_per_course A function named totalSalary that returns total payment for all courses (i.e. no_of_courses * salary_per_course) A member function named display to show total salary and the number of courses he/she has been taught In the main() function, create an object of VisitingProfessor and…arrow_forwardC# programming question. This task will be a car dealership where you’ll help the user find the car(s) they want. This program should keep going until the user either decides to not continue with the purchase, or the purchase is complete, and no more order is being processed. You will need 3 structs to store: • client information • order information • used_car information Each struct would have the following fields: struct used_car { int carID; char brand[length]; char make[length]; int year; int mileage; float price; }; struct order { int numCosigned; int carID; float pricePerPerson; }; struct client { char firstName[length]; char lastName[length]; bool isEmployed; int creditScore; }; I. global variables: • Create an array of struct used_car and add some cars in there. I put 4 cars. You can do as many as you want (at least 3). • Make sure to put the struct definition above the array creation, otherwise, it won’t work. o This is similar to you trying to call a function X that’s not…arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education