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
- Create an Account Object project. 1. Create an Account class and use the provided UML diagram to code the instance fields, constructors and methods. Note: The type of accounts are 1 (Savings) or 2 (Cheque) The constructor must assign the values of the parameters to the data fields/instance variables. The static field must be increased by one in the constructor. The setAccNumber() is a private void method. The account number must consist of the first 3 letters of the name of the account holder, the digit indicating the type of account and #-character and a 3-digit random value. This method must be called from the constructor. The makeDeposit() method must add the amount received as a parameter to the balance if the value received is not a negative value. The withdrawAmount() method must check whether the balance allows for the amount to be withdrawn. There must always be a minimum amount of R 100.00 in an account. If there is not enough money in the account to do the transaction,…Question 1: Create a class Mobile, declare its variables for mobile specs (i.e brand, color, camera) and initialized constructor. Provide set, get and display methods for each instance variable. Now create several mobile objects in main class to call these functions. Question 2: Write a program to create a room class, the attributes of this class is roomno, roomtype, roomarea and ACmachine. In this class the member functions are getdata, setdata and displaydata. Now create several objects in main class to call these functions.Consider five classes i.e. Professor, Researcher, Department, Laboratory, and University having following specifications. Class University has Two attributes of type string i.e. universityName and location An attribute named dept of type Department Class Department has Two attributes i.e. deptID, deptName A two-argument constructor to initialize data fields with user-defined values A member function display() to show all attribute values Class Laboratory contains Two attributes i.e. labID and experimentNo A two-argument constructor to initialize data member with user-defined values Class Professor has A data field named profName of type string A data field named dept of type Department A two-argument constructor to initialize both attributes of user-defined values Class Researcher has A data field named profName of type string A data field named dept of type Department An attribute named lab of type Laboratory A constructor to initialize lab with user-defined…
- Design a class named Employee. The class should keep the following information infields:• Employee name• Employee number in the format XXX-L, where each X is a digit within the range0-9 and the Lis aletter within the range A-M.• Hire date* Write one or more constructors and the appropriate accessor and mutator methods for theclass.Next, write a class named ProductionWorker that extends the Employee class. TheProductionWorker class should have fields to hold the following information:• Shift (an integer)• Hourly pay rate (a double)The workday is divided into two shifts: day and night. The shift field will be an integer valuerepresenting the shift that the employee works. The day shift is shift 1 and the night shift isshift 2. Write one or more constructors and the appropriate accessor and mutator methodsfor the class. Demonstrate the classes by writing a program that uses a ProductionWorkerobject. have to use beginner code because this is an intro class.Design the class Manager that inherits from the Employee Class (defined in Question 1) and contains the two private data members, managedDepartment of integer type and managerAllowance of double type. Add the following public member methods: 1. One constructor without parameters. 2 One constructor with parameters related to managedDepartment and managerAllowance. 3. getManagedDepartment to return the managedDepartment. 4. getManagerAllowance to return the managerAllowance. 5. PrintEmpinfo to display the manager information data on the standard output. I 18 public class Manager extends Employee{ int managedDepartment3; double managedAllowance;Constructors of a class can be both public and private. Explain why you would create a private constructor. Create a simple class with a single data member of your choice. Create a private constructor. In your code demonstrate how a private constructor is called and how the object is created using a private constructor
- Step 1. Start the programStep 2. Create a class student which contains primitive data members.Step 3: Define a constructor to initialize the data members.Step 4: Define the methods get and display to get and display the data members.Step 5: Create object for the class to access the member functions.Step 6: Display the resultStep 7: Stop the program.Calculate the grade book;1. Create a class person having 5 data members. Name Address Cnic Gender Age All data members should be hidden by the use of data hiding concept. These values will be initialize using the child class constructor. For getting the values of these data members getter method will be created for all data members in the parent class i-e Person. 2. Create another class Teacher that will inherit properties and functionalities from perso class. Teacher class will have experience data member and an array of subjects taught that particular teacher. 3. Provide setter and getter methods for all data members. 4. Teacher is allowed to teach at least 2 subjects. 5. Perform input validation in setSubject() function so the user will not be able to input anything except string value. 6. Default experience of the teacher will be 2 years. 7. Parameterized constructor of person clas will be called using the teacher class constructor. This will initialize all the data members of person class. 8. Using…Design a class named Point that meets the following requirements: Two data fields x and y for representing a point with greater methods A no-arg constructor that constructs a point for (0,0) A constructor that constructs a point with the specified x and y values Override the equals method. Point p1 is said to be equal to point p2 if p1.x == p2.x and p1.y == p2.y Override the hashCode method. (for reference, see the implementation of the Point2D class in the Java API). Then write a program that tests/uses your new Point class.
- Define a Course base class with the following attributes: number - course number title - course title Define a print_info() method in Course that displays the course number and title. Also define a derived class OfferedCourse with the additional attributes: instructor_name - instructor name location - class location class_time - class timeConstruct a Time class containing integer data members seconds, minutes, and hours. Have the class contain two constructors: The first should be a default constructor having the prototype Time(int, int, int), which uses default values of 0 for each data member. The second constructor should accept a long integer representing a total number of seconds and disassemble the long integer into hours, minutes, and seconds. The final member method should display the class data members.pls help me using python This is the code it provides: class Artist:# TODO: Define constructor with parameters to initialize instance attributes# (name, birth_year, death_year) # TODO: Define print_info() method. If death_year is -1, only print birth_year class Artwork:# TODO: Define constructor with parameters to initialize instance attributes# (title, year_created, artist) # TODO: Define print_info() method if __name__ == "__main__":user_artist_name = input()user_birth_year = int(input())user_death_year = int(input())user_title = input()user_year_created = int(input()) user_artist = Artist(user_artist_name, user_birth_year, user_death_year) new_artwork = Artwork(user_title, user_year_created, user_artist)new_artwork.print_info()