Complete the thick.h, thick.cpp, thin.h, and thin.cpp classes in the attached pizza solution. Modify your main.cpp class so that it creates a thin and thick crust pizza if selected by the user. Your solution should allow the user to order a regular, stuffed, thin or thick crust pizza. All child classes (stuffed, thin, thick) should inherit attributes and functions from the Pizza class. The stuffed class has already been implemented. The thick and thin class set_cost() funtions should differ in the following ways: thick crust has an additional charge of $2 thin crust has a cost discount of $1
Q: Describe multiple inheritance. In practise, discuss its advantages and disadvantages.
A: Introduction Multiple inheritances are a feature of some object-oriented programming languages in wh...
Q: o, what exactly is artificial intelligence? With an example, explain how the control system plays a ...
A: Artificial intelligence is wide ranging branch of computer science concerned with building smart mac...
Q: Using pyinputplus write code to only accept yYnN0 for a user input
A: inputYesNo() : Accepts ‘yes’/’no’ or ‘y’/’n’ in case-insensitive form. Returns ‘yes’ or ‘no’.
Q: The claim was made that a nonce can be used to prevent the “double submission” problem in web applic...
A: Nonce is actually an acronym that stands for "Number used ONCE". As a security measure, it protects ...
Q: Describe how the implementation of the following style rule differs between Internet Explorer operat...
A: Explanation: Internet Explorer shows a mild difference when running in Quirks mode and standard mod...
Q: In a few words, describe the control characters in ASCII.
A: Solution: Introduction to ASCII control characters A control character is a nonprintable character ...
Q: write a pseudocode and flowchart with comments mobile Phone Packages Dialog is a Mobile Phone compa...
A: // Pseudocode to compute and display the total monthly charges for a customer Module Main // decla...
Q: If you want to read data from a file, what type of file stream object do you create?
A: Introduction: The input file stream is represented by this data type, which is used to read data fro...
Q: (Memory Management): Write a program to simulate Memory Management for First-Fit. Define 10 element...
A:
Q: students in the BIT Level 300 class obtained various grades in a mid semester exam. create an algori...
A: Flowchart is a representation of an algorithm in the graphical way. It is very effective and efficie...
Q: nteger h, h without leaving a remainder. Consider the below Computational Problem: CountDivisorsProb...
A: import java.util.*;public class Main{ public static int CountDivisors(int N) { int coun...
Q: --> x - linspace (-20, 20,1000); --> yl - x. *sin (x); --> y2 - -x3; > plot (x, y1, 'b',x, y2, 'r');...
A: # importing libraries import matplotlib.pyplot as p import numpy # defining x and y axis x = numpy.l...
Q: Create a function that takes the same group as number n and returns a list of two numbers from the a...
A: Step 1 : Start Step 2 : Define a function two_product() which accepts a list and a number n as param...
Q: In what cases would you advocate the use of assembly language code in the creation of application so...
A: Introduction: Mnemonic codes, analogous to English words, are used in assembly language. Although de...
Q: In what ways does the information system differ from other systems in terms of organizational, manag...
A: Introduction: An information system (IS) is a structured, sociotechnical organizational structure us...
Q: What are your thoughts on cyberbullying?
A: Introduction: Bullying online can be far more emotionally draining than bullying in person.
Q: Write a python program with two or more functions that uses three or more paramters and arguments in...
A: Find the required code in python given as below and output:
Q: Almost all modern appliances can communicate wirelessly thanks to technological advancements. Have t...
A: Introduction: The internet's relevance in business has grown as communication and information techno...
Q: List out the benefits of biometric authentication?
A: Biometric authentication: It us used to identify the person’s authentication by using physical part ...
Q: . Identify the networking software which helps you to communicate with your teacher and instructors....
A: Software: Software is a program or set of instructions given to a computer system or device to perfo...
Q: Five important disciplines of computer science are affected by data security issues.
A: Introduction: The most basic method of safeguarding a computer system from theft, vandalism, invasio...
Q: What are the benefits of using PowerPoint as a tool in the classroom?
A: answer is
Q: Considering images, what are three possible parameters or things one can change to reduce the size o...
A: Resizing of the image can be done in different ways, however this is generally done by resampling.
Q: Which of the following uses persistent memory chips to store data Hard disk Compact disk Ram Fl...
A: Persistent memory is a solid-state high-performance byte addressable memory device that resides on t...
Q: Give any six reasons why you should represent software while designing an interface for any form of ...
A: Introduction User interface design system- user interface design is basically a process that builds ...
Q: lates, and t
A: given - What are the axioms, postulates, and theorems of Boolean Algebra?
Q: A processor's primary structural components should be mentioned and briefly characterised.
A: the primary structural components are :-
Q: What is the distinction between sequential and random access?
A: Introduction: We look at how data is written or read to a computer programme when we talk about sequ...
Q: hat distinguishes a software development process from software modelling? Explain how one aids the o...
A: Introduction: Process of Software Development: A software development process is a method of separat...
Q: rart 2: [2 A U-N flip-flip works as follows: UN=00 the next state of the flip-flop is 1. UN=01 the n...
A: a. From given data, table will be as below: Present State Q Next State Q+ U N 0 0 1 1 0 1...
Q: dulable for the hedulable fora
A: An organization is driven by the members it has to work for. Therefore selection and training proces...
Q: A certain CS prof 5-А, 4-B, 3-С, 2-‑ input and uses a
A: here in this question we have asked to write a program which take quiz score as input and calculate ...
Q: What is the procedure by which algorithms work?
A: Introduction: A strategy or technique for solving a problem based on conducting a series of steps is...
Q: a, b, c = input(’Enter three numbers: ’) if a > b: if b > c: print "Spam Please!" else: print "It’s ...
A: a,b,c=input("Enter three numbers: ")//3 numbers will be inputted. For example a=2,b=1,c=3if a > b...
Q: What Is A Symbol Table?
A: here is the solution. Symbol Table is an important data structure that is used in a Compiler.
Q: LWC Assignment: Create a LWC component to display the output. You can create the dummy data in JS fi...
A: Intro To LWC: LWC is a stack of modern lightweight frameworks built on the latest web standards. It ...
Q: To construct an object of the class Book and initialize its properties, how would you go about using...
A: INTRODUCTION: Object initializer: Object initializers require you to assign values to fields or asse...
Q: The variable t after these commands t = (16:-4:1) '.^ 2 will be O a 4-element vector a 4x4 matrix O ...
A: Answer:
Q: QUESTION 9: Pumping lemma with length Use the Pumping Lemma with length to prove that the following ...
A: Below is the answer to above question. I hope this will be helpful for you..
Q: Discuss and explain computer networks and systems.
A: Introduction: Computer networks connect computers and serve as the Internet's backbone.
Q: Question 32 Promiscuous Delta is a metric based on events reported in the Cisco Security Agent (CSA)...
A: Note: As per company guidelines we are supposed to answer only one question. Kindly repost other que...
Q: what are some currently existing usage of VR, AR or MR
A: VR stands for Virtual reality which is used for complete immersion experience that shuts out the phy...
Q: Consider the following relations about NBA: P LAY ER(pid, pname, nation). Each tuple describes a p...
A: 1 Select t.tname,r.year from TEAM t join REGISTER r on t.tid = r.tid join PLAYER on p.pid= r.pid...
Q: converting infix to postfix 1. if you encounter an operand, append it to the output string postfixEx...
A: ope = {'(', ')','+', '-', '*', '/', '^'} associativity = {'-':1, '*':2,'+':1,'^':3, '/':2} def infi...
Q: USING C++ Convert the following infix expressions to postfix form by using the algorithm we discuss...
A: Given infix expressions are A) a - b + c B) a - (b / c * d)
Q: Determine the primary components of an information system. What is the definition of a mission-criti...
A: Primary components of an information system The main components of an information system include ha...
Q: What is the role of current technology in effective communication and how is it used?
A: Introduction Communication is the most important expect of human life. To generate, pass and organiz...
Q: Adjacency matrix. Given a relation relation (as a numpy.array, see example below) and number of node...
A: PROGRAM EXPLANATION Import the NumPy. Create the program as given in the question. Inside the adjac...
Q: Solve the problem in C++ (Financial application: compute the future investment value) Write a func...
A: #include <iostream>#include <math.h>using namespace std; double futureInvestmentValue(do...
Q: Identify and describe the hazards associated with the development of an online library for a softwar...
A: Risk Analysis : Risk Analysis is the way toward evaluating the probability of an unfavorable functio...
Complete the thick.h, thick.cpp, thin.h, and thin.cpp classes in the attached pizza solution. Modify your main.cpp class so that it creates a thin and thick crust pizza if selected by the user. Your solution should allow the user to order a regular, stuffed, thin or thick crust pizza. All child classes (stuffed, thin, thick) should inherit attributes and functions from the Pizza class. The stuffed class has already been implemented. The thick and thin class set_cost() funtions should differ in the following ways: thick crust has an additional charge of $2 thin crust has a cost discount of $1
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- Use the parent classes to the left to help you solve this problem. The first parent is the Person class with some very generic information. The second class, CardHolder, is the class for a credit card holder. Create the child class PlantinumClient. This class inherits all of the attributes of both parent classes. In addition, the child class has the attributes cash_back and rewards. cash_back should be set to 0.02 and rewards should be set to 0. Override the process_sale method so that 2% of each sale is added to rewards. Expected Output Declare an instance of the PlatinumClient class as shown below. platinum = PlatinumClient("Sarah", "101 Main Street", 123364) Your class should be able to execute the code below in the stated order and produce the given return values. Order Code Return Value 1 platinum.process_sale(100) N/A 2 print(platinum.rewards) 2 3 print(platinum.balance) 100 4 platinum.make_payment(50) N/A 5 print(platinum.balance)…Every employee in a firm XYZ has attributes employeeid, name and salary. However the sales employees in firm XYZ has all the attributes of employees and also has an additional attribute named bonus. You are a software developer who has to the implement the relation between employee and sales employee. Write the code for classes employee and employee_sales. Write the constructors for both classes that set the attributes of both classes.B - RobotFriend Create a RobotFriend class. RobotFriend is a new toy just on the market. Copy the starter class and the tester from Codecheck. A RobotFriend has a name and replies to various commands Provide a constructor that takes the name of the RobotFriend as a parameter. Remember that a constructor has the same name as the class. What does the class need to remember? That is the instance variable. Provide the following methods: public String getName () gets the name of this RobotFriend • public void setName (String newName) sets a new name for this RobotFriend • public String whatDoYouNeed () returns a string consisting of name + needs a battery charge" where name is the name of this RobotFriend (which was supplied in the constructor) public String doCommand (String whatToDo) returns a string consisting of "Your friend " + name + does not + whatToDo where name is the name of this RobotFriend and whatToDo is the parameter
- Write a shoe class with the following attributes: color (e.g., "blue", "green", "orange") displayName (e.g., "nikes, adidas", "puma") price (e.g., 100, 200,60) Include only one constructor. It should have parameters for each of the attributes and set their values. Additionally, include getters and setters for each of the attributes. Add a driver, name it Purchases, and create 2 objects. Finally, print out some information about both objects (i.e., print the information from some or all of the getters). For example, if you created a shoe object whose color was blue, whose display name was shoes , for a price of 230, you could use the getters to print something like this:These work trousers are blue and cost $230Implement the Seller class as a derived class of Person class. Create the seller.h and seller.cppfiles for this class. The Seller class contains additional data members that hold a seller’s:o average star rating received from the buyers, ando total number of items sold.These data should be accessible by its derived classes. (should these data be private, public, orprotected?) The following methods are included in the seller class:• A default constructor and a copy constructor• A constructor that receives all of the data for a seller.(for the constructors, make sure to call the base class constructor as appropriate)• Appropriate get and set functions for the new data in this class• print() – overrides the base class print() to print the base class data and print all additionalseller data with appropriate messages. Make sure to call the base class print to print thebase class data.• read() – overrides the base class read() to read the base class data and reads all additionalseller data…An airport van shuttles passengers between the terminal and the parking garage. After 4 trips, the tank is empty, and the van needs to drive to the gas station. After it has been refilled, it will drive to the terminal. The behavior of the van depends on two states: its location (terminal, garage, or gas station), and the tank level (empty or not). Complete the following class. The constructor yields a van in the garage with a full tank.
- An airport van shuttles passengers between the terminal and the parking garage. After 4 trips, the tank is empty, and the van needs to drive to the gas station. After it has been refilled, it will drive to the terminal. The behavior of the car depends on two states: its location (terminal, garage, or gas station), and the tank level (empty or not). Complete the following class. The constructor yields a van in the garage with a full tank.The class "Student" has the following attributes: studentId (int), name (String), surname (String), deptCode (String).Write a constructor method for the "Student" class that takes values as parameters for all these attributes.Create a Right Triangle class that has two sides. Name your class rightTraingle. Code getter and setters for the base and the height. (Remember class variables are private.) The class should include a two-argument constructor that allows the program to set the base and height. The constructor should verify that all the dimensions are greater than 0. before assigning the values to the private data members. If a side is not greater than zero, set the value to -1. The class also should include two value-returning methods. One value-returning method should calculate the area of a triangle, and the other should calculate the perimeter of a triangle. If either side is -1, these functions return a -1. The formula for calculating the area of a triangle is 1/2 * b*h, where b is the base and h is the height. The formula for calculating the perimeter of a triangle is b+h+sqrt (b*b+h*h). Be sure to include a default constructor that initializes the variables of the base, height to -1. To test…
- Create a Book class with attributes such as book title, author, and price. Implement a parameterized constructor to initialize these attributes. Now, extend the functionality of the Bookstore class by adding a new method called 'addBook.' This method should allow the addition of custom books to the bookstore's inventory. The method should take three parameters: title, author, and price. Implement this method to ensure that the bookstore's inventory is updated accordingly. Instantiate a new object of the bookstore, naming it 'ReadersHaven, utilizing the extended class with the newly added 'addBook' method. Your next step is to add three distinct custom books to 'ReadersHaven-for example, 'The Silent Observer® by Jane Doe, priced at $20.99, Adventures in Wonderland" by Lewis Carroll, priced at $15.50, and 'Programming Mastery by John Coder, priced at $30.75. To conclude, utilize a 'displayinventory' method to showcase the updated information about 'ReadersHaven." Verify that the output…1. Create a Student class that implements the Person interface. As well as storing the students name and email, also store their course grade (e.g A, B, C) in a member variable. The grade should be accessible via a getGrade method. For the implementation of getDescription return a message along the lines of “A C grade student”, substituting the students actual grade.2. Create a Lecturer class that implements the Person interface. This class should also store the subject that the lecturer teaches. Add a getSubject method, and implement getDescription so that it returns a suitable message, e.g. “Teaches Biology”.3. Create a third class, Employee that implements the interface. This should also store the name of the department the Employee works in (available via getDepartment). Again, getDescription should return a suitable message.Suppose that class Child extends class Parent, and that Parent does not explicitly extend another class. Suppose also that Child has THREE constructors and Parent has TWO constructors. When creating a Child object, Child c = new Child(...), what is the minimum and maximum number of constructors being called in total?