Question 5 (a) Write a class named Pizza based on the following members: A private instance variable name (String) that stores the name of a pizza A private instance variable description (String) that stores the description of a pizza A private instance variable size (char) that stores the size of a pizza. A private class variable discount (float) that stores the discount (in %) of all pizza A parameterized constructor that initialization the attributes name, description and size. setter for attribute discount A method named price that returns the price of a pizza based on its size: Size 'P' 'R' 'L' Description Personal Regular Large Price (RM) 9.90 25.90 37.90
Q: What is the computer Internet Control Message Protocol, or ICMP, and how does it function?
A: Introduction: The Internet Control Message Protocol, sometimes known as ICMP, fulfills the following…
Q: Is today's technology being used to its full potential in the field of effective communication?
A: Effective communication: The process of communicating ideas, views, information, and facts in order…
Q: What are the dangers of having a security system placed everywhere? Why has this infrastructure not…
A: Security device: Security cameras are an excellent tool for increasing your feeling of security…
Q: Write a program that generates a random number between 1 and 500 and asks the user to guess what the…
A: C++ Program: #include <iostream>#include<cstdlib> using namespace std; //Main…
Q: It is the focus of this article how computers are used in Kenyan health care today.
A: Kenya like other emerging nations is confronted with a weight of illness bothered by destitution.…
Q: List out names of 10 reserved words in Python?
A: Question is asking for name of 10 keywords in Python Programming Language.
Q: 1. Prove the following using an inductive argument: (2i-1)=n² i=1
A:
Q: Question 4 The ARM allows any instruction, including branches to be executed conditionally. O True O…
A: Introduction: The Arm processor was created by Acorn Computers in the 1980s. Up until recently, the…
Q: What does it mean to be transitive? Tables in the second normal form can be converted to tables in…
A: Answer: Before we can go on to transitive dependence, we need to first have a solid understanding of…
Q: Which of these is associated with a private network adapter? O a. Two network adapters. O b. Server…
A: The Private Network to Network interface is the link-state routing protocol used in asynchronous…
Q: What are the many aspects of a network's capacity for efficient communication that may be affected…
A: Introduction: Many factors, including the technology of the devices used, the local environment…
Q: How could I type by hand tens of thousands of files in tens of thousands of directories in what you…
A: Here is the solution:
Q: Q2/Write a program that reads from the user the value of x and apply the function below:
A: Consider the given functions : Note: Since the programming language is not mentioned i used "C"…
Q: What are your thoughts on the current state of the internet and the technology that underlies it?
A: The Internet uses the TCP/IP (Transmission Control Protocol/Internet Protocol Suite) standard for…
Q: 1. Perform the following subtraction using 10's complement on 532 - 794.
A: Ans : A 10's complement can also be used to subtract decimal numbers. In order to calculate the 10's…
Q: In a study of patient travel time, researchers found that patients of colour and the unemployed had…
A: Here is the solution:
Q: Write a class that keeps track of concert promotion information. First download ConcertPromoter.java…
A: answer starts from step 2
Q: Thank you, but I have 10K directories that have tens of thousands of file in them. How to use the…
A: Here is the solution:
Q: Write a VB6.0 program to find the sum of first 10 numbers (1, 2,3, to 10).
A: Algorithm: Step 1: Write the main() Step 2: Define the required variable sum Step 3: Using for loop…
Q: Currently, how is the internet of things being used?
A: Introduction: Everything that is linked to the internet is meant. Additionally, it can refer to…
Q: was a variable. In addition, the index of the array can be an expression. int a[6] = {4, 8, 15, 16,…
A: Here in this question we have given a code segment and we have asked explain the line which are star…
Q: What exactly is SMP (Symmetric Multiprocessing)?
A: Definition of Symmetric Multiprocessing
Q: Question: Write a program in C++ language to print on the screen of computer the counter from 1.7 to…
A: The answer for the above question is given in the following steps.
Q: Q-2-1 Write a C++ code to declare a node that contains two fields (Data and Next), multiply each…
A: Program: #include<iostream>#include <stdlib.h>#include <time.h> using namespace…
Q: program Assembly-emu8086 speeding alarm
A: Lets see the solution in the next steps
Q: Write the salient operating system. features of NIX
A: Dear Student, The salient features of UNIX operating system is given below -
Q: Explain top-down analysis with an example.
A: Answer:
Q: William Tucker is a well-known and currently he is cooking a big pizza in rectangle shape having…
A: Code implementation: n = input()m = input()i=j=1array4[1505][1505]=0for i in n: for j in m:…
Q: PROBLEM 4 The Pee Tool Shop has four heavy presses it uses to stamp out prefabricated metal covers…
A: The answer is
Q: Create a Java class Recursive Methods.java and create the following methods inside: ALL THE METHODS…
A: Answer: Algorithm: 1. we have create class as RecursiveMethods 2. we have create a method…
Q: There are several advantages to communicating through electronic means. Were you aware of any…
A: Problem related to electronic communication is below:
Q: A thread is running at priority 30. What is its re-assigned priority if: (a) it used its entire time…
A: a) It used its entire time quantum: When the entire time quantum is used then the…
Q: a. Write a class called hyprid that uses linked lists to represent a queue and stack. As you can…
A: The program has been provided in Java programming language. An additional function called display()…
Q: IT departments may be organised in a variety of ways in commercial companies.
A: Here is the solution:
Q: PROBLEM 6 An investment firm has $1 million to invest in stocks, bonds, certificates of deposit, and…
A: b) Solution of the model using LINDO is as follows
Q: PROBLEM 10 The Graphic Palette is a firm in Charleston, South Carolina, that does graphic artwork…
A: The Flow outline is appended in the response. The Black Font connotes the amount crossing over…
Q: In what ways have computers and the internet as we know them today been shaped by various…
A: Introduction: US research and development activities to set up and link computer networks…
Q: Using java: How can I use a for loop to tune a radio object to 104.5 MHZ? Originally starts out at…
A: The syntax for the 'for loop' in java is: for(initialization; termination condition;…
Q: It is the focus of this article how computers are used in Kenyan health care today.
A: Given: The provision of healthcare services in Kenya has been significantly impacted by the usage of…
Q: Describe some of the exciting new applications that are becoming feasible as the internet of things…
A: Introduction: For starters, as IoT technology progresses, more firms will benefit from IoT…
Q: Rare Collection. We can make arrays of custom objects just like we’ve done with ints and strings.…
A: Java:- Advantages- It is easy to write compile debug and run java programs It is portable or…
Q: 2. In this problem we will work with a rotation matrix. Rotation matrices are commonly used for…
A: Matlab Codeclc();clear('variables');close('all'); %------------ Part(a)…
Q: use c++ 3. Write a program that reads in a sequence of integer inputs between 1 and 100 (using a…
A: CODE ND SCREENSHOT OF OUTPUT:
Q: What do you understand by the programming languages? Define any four programming languages.
A: Introduction: A language is a form of communication that people use to express their thoughts and…
Q: What is the easiest method to tell whether an application is influencing the output of a device? Is…
A: Start: The tendency toward standard interfaces for a broad variety of devices, which makes it easier…
Q: Consider a system with a dynamic range of 48 dB, find the following: a. Minimum and actual number of…
A: Dynamic Range= 48 dB Minimum and actual number of bits, Dynamic range= 20 log(2n-1)…
Q: Q2/Write a program that reads from the user the value of x and apply the function below: fx= 1…
A: C++ program for above : #include <bits/stdc++.h> using namespace std; //function to…
Q: Synaptic weights are w,-1.2, w, -0.4, w,-0.7. Find the given input above (or) below
A: The answer is
Q: Discuss the main functions of vi editor in detail.
A: vi Editor vi stands for Visual Editor. vi is a text editor with a focus on screens that was…
Q: Solve the recurrence relations. a. Compute --2(2k + 1) k b. Compute 1+1
A:
java code, pls use more // comments
Step by step
Solved in 2 steps with 1 images
- 1. Which of these are ways you could refer to original and new class pairings? first class/second class parent/child base class/derived class superclass/subclass 2. We access both object and class attributes using dot notation True False 3. A function within a class definition is a(n) class function operation object function method 4. Objects have A value A type A reference count A unique ID 5. A class is a(n) _________ for an object Which of the following is not appropriate to fill in the blank? blueprint mold set of instructions accessor 6. A____could be thought of as a mold that creates objectsA class named Person having A protected attribute name as string. A protected attribute cnic as int. A private attribute address as string A private attribute fatherName as string. A parametrized constructor that assigns provided values to all the attributes. A Teacher class that is-a Person as well, has A private attribute Id. A parametrized constructor that assigns Id, name, cnic, address, fatherName. (You should call super constructor to assign values for Person) A class named Course has A private attribute String courseName A private attribute Teacher teacher A private attribute double marks. (min: 0 and max 100) A private attribute int creditHours A private attribute char grade A private attribute double GPA A parameterized constructor to initialize attributes courseName, creditHours and marks, this constructor should also calculate grade and GPA, according to the grading policy defined in table below: Latter Grade Percentage Gpa A 80-100 4 B 70-75 3 C 60-69 2…1. Which of the four fundamental features of object-oriented programming could be thought of as removing unnecessary details, allowing the user to focus only on what is necessary? (put NA if it applies to none of them) 2. Classes cannot contain multiple attributes without instantiation of multiple objects True False 3. class Cow: def _init_(self,name,age,weight): self.name=name self.age= age self.weight=weight my_cow=Cow('bessie',8,1800) print(f'I have a cow naned {my_cow.name}') Based on the above code, what would print, and why? Error; my_cow was not created properly I have a cow named Bessie; because the code is fine Error; 8 and 1800 were not utilized Error; Cow was not created properly 4. class car(): def _init_(self,name): self.name=namemycar=car("Mysterious Machine")type(mycar) Given this code, what is the type of…
- Which (if any) of the following conditions are necessary for using polymorphism? Select all correct answers. The classes involved are in the same hierarchy. None of the classes can be abstract. All of the subclasses involved override the same method. The object reference cannot be of an interface type. An object reference of the superclass is used to call any methods. A superclass object is referenced by a subclass reference. Which of the following (if any) are true of abstract methods? Select all correct answers. Abstract methods must have a method body. Abstract methods cannot be declared in a class that isn't abstract itself. Abstract methods cannot be private or static. Abstract methods can only be declared in an interface. Abstract methods cannot be called. Constructor methods can be abstract.Which (if any) of the following conditions are necessary for using polymorphism? Select all correct answers. The classes involved are in the same hierarchy. None of the classes can be abstract. All of the subclasses involved override the same method. The object reference cannot be of an interface type. An object reference of the superclass is used to call any methods. A superclass object is referenced by a subclass reference. Which of the following (if any) are true of abstract methods? Select all correct answers. Abstract methods must have a method body. Abstract methods cannot be declared in a class that isn't abstract itself. Abstract methods cannot be private or static. Abstract methods can only be declared in an interface. Abstract methods cannot be called.Create a class Person to represent a person according to the following requirements: A person has two attributes: id Add a constructer to initialize all the attributes to specific values. Add all setter and getter methods. Create a class Product to represent a product according to the following requirements: A product has four attributes: a reference number (can’t be changed) a price an owner (is a person) a shopName (is the same for all the products). Add a constructer without parameters to initialize all the attributes to default values (0 for numbers, "" for a string and null for object). Add a second constructer to initialize all the attributes to specific values. Use the keyword "this". Add the method changePrice that change the price of a product. The method must display an error message if the given price is negative. Add a static method changeShopName to change the shop name. Add all the getter methods. The method getOwner must return an owner. Create the class…
- Model a room class, whose member data is three integers length, width and height. The classcontains two constructors to initialize the room class objects, first is no argumentconstructor, while the second in three arguments constructor. Class also contains threemember functions i.e., getdatat) to get the data from user and store in the memory of callingobject and showdata) to show the room data of calling object, int volume(int I, int w, int h)function should receive the length, width and height values from the objects one by one andreturn the volumes of the three objects respectively.Write a main program to declare the three object rl, 12, and 13 of room class. Two objectwill store the values through three argument constructor and third object will get the datafrom user by calling getdata function. Then all three objects should call the volumefunctions to calculate their volumes and store them in three variables of type integer. Finallythe system compare the three volumes values…Create a class home with following data members, area (int), and cost as protected datamember. Create a class (with data members as city, state) derived from this bass class home.Enter the detail for 5 objects (derived) and search with state to display all the homes available. c++Consider the following class definitions: (2, 8) a. Which private members, if any, of smart are public members of superSmart? b. Which members, functions, and/or data, of the class smart are directly accessible in class superSmart?
- Create a class named TESLA Demonstrate through a program - .create four public member variables: numerOf Doors, engineSize, modelName, msrpPrice and two private member variables: chassiNumber, vinNumber for this class • Demonstrate creation of three objects of this class by instantiating the objects with constructors Object 1: public variables: 4 door, 300kW, Tesla model 3, $46000 to $70000; private variables: abc123; 12345 • Object 2: public variables: 4 door, 600kW, Tesla model S, $99000 to 111000; private variables: xyz123; 45678 Object 3: public variables: 2 door, 1000kW, Tesla model Roadster, $200000; private variables: jfk123; 001 Create get and set functions for all the member variables • Create two additional functions for this class: . . . • A function that asks user input for a price range and based on that prints all four public variables: numer Of Doors, engineSize, modelName, msrpPrice Example: input: $100000 should print details of Tesla Model 3 and Model S. Example:…C++ please help me answer this question I will give you a good rating Thank you! Choose the correct answer to the question. Which of these is not a property of a class? Member variables and member functions may be public, protected, or private. A class may not use another class as the type for a member variable. The name of a member function for a class may be overloaded just like the name of an ordinary function. A function may have formal parameters whose types are classes. A function may return an object of a class. Choose the correct answer to the question.The copy constructor is executed... When one object is assigned to another object at its creation When objects are passed to a function using call by value When the function returns an object reference.b, c only a, b onlyAll of the aboveC++ please help me answer this question I will give you a good rating Thank you! Choose the correct answer to the question. A derived class... a. Can contain more attributes (data members) and behaviors (methods) than its base class. b. Can be the base class for other derived classes.c. Object can access all data members with the dot operator. d. Object can be assigned to a reference of the base class. a, b only.a,b,d only.All of the above. Choose the correct answer to the question. Which of the following can be changed when overloading an operator? The precedence of the operator.The associativity of the operatorThe arity (number of operands) of the operator. All of the aboveNone of the above