Q3. Write a Java program to implement the concept of run time polymorphism through method overriding with the following scenario. There are three music companies Tips, Zee and T series. These companies use a super class Music, where there is a constructor for initializing music and play() method to play music. Create subclasses Tips, Zee and Tseries that overrides a play() method in the super class and add some new functionality to it. You can use print statement in the body of the constructor and method of the class.
Q: PROBLEM 10 The Graphic Palette is a firm in Charleston, South Carolina, that does graphic artwork…
A:
Q: Write a program that prompts the user to input the three coefficients a, b, and c of a quadratic…
A: Sample Response: #Python program to find the roots of quadratic equationimport math# function to…
Q: em: How many levels of 4-2 reducers are nee
A:
Q: Write a pseudo code for a program that will implement the following decision table in Table 2. The…
A: Given table contains, two columns that are Grade point and class of Degree. Read the Grade point…
Q: #include using namespace std; int fib(int n) { if (n >n; cout << "The next number in the Fibonacci…
A: Given To know about the C++ programing language.
Q: Given the relation schema R(A, B, C) and S(C, D, E), please match each of the following relational…
A: Union Operator (∪) is used to find the union of two relational schemas. The result will include the…
Q: What is output? class Student { public: Student() { cout << "This is constructor" << endl;…
A: a special member function is responsible for initializing the class's objects in C++ the…
Q: Q1- Convert the following: a-1011 1100B to hexadecimal b- 173D to binary c- 4 1.6875 to binary d- If…
A: As per Bartleby's policy, only the first 3 parts can be solved for the multi-part questions. Please…
Q: Convert the following pairs of decimal numbers to 5-bit 2's-complement num- bers, then perform…
A: The 5- bit 2's complement numbers for the given pair of decimals and performing addition and…
Q: hat does a TRC query mean? More precisely, what is en TRC query? The answer to a TRC query {T | p of…
A: Introduction: Below the TRC query mean and the set of answer tuples for a given TRC query
Q: int i = 0; i < a.ler [1] = a[(a[i] + 3)
A: Dear Student, Here array a contains 5 elements thus length of a is 5 and a.length is 5 , based on it…
Q: Given the 1101011011 data frame and generator polynomial G(x)=x^4+x+1. Derive the transmitted frame.
A:
Q: Create a class named vehicle. The class has the following members: 1. Private data elements: a.…
A: import java.util.Scanner;//to read input//class vehicleclass vehicle{ //private data elements…
Q: Plot of the function Z-t^3-t, 1<=t<=10 with a dash dot yellow line and show the actual data points…
A: figure % given range of t t = 0:1:10; % plot function % dash dot line added using -. and…
Q: In the statement below, "Xyzzy" is a/an ... public class Foo extends Bar implements Xyzzy { } ...
A: In the statement below, "Xyzzy" is /an ... public class Foo extends Bar implements Xyzzy{ ... } It…
Q: stion. a program print screen of computer the counter from 1.7 to 14.7 increment by 0.7 using for…
A: Answer:
Q: Courses Review and Tix the errors in the following code segment. public Task1 { public void…
A: Given code: public Task1{ public void main(Strinng[] args) { x=5; int y=5.0; int…
Q: Question: Write a program in C++ language to print on the screen of computer the counter from 1.7 to…
A: The program is written in C++. Check the program screenshot for the correct indentation. Please…
Q: rive the logic expressions for a circuit that compares two unsigned numbers: nd Y = y2y1yo and…
A: To compare two unsigned numbers, you need to compare the individual bit positions. Start with the…
Q: ✓ D21 zy M b + C D21 Login Southern N...…
A: The matrix which contain the interchange of row into column and column into rows of actual matrix is…
Q: switch times needed follow used: (a) Circuit switching; (b) Virtual circuit and datagram packet…
A: The answer is
Q: Problem: Assume that 20 percent of the dynamic count of the instructions executed for a program are…
A:
Q: What is constant in FORTRAN? Ho many different types of constant ar known in FORTRAN?
A: The fixed values that the programme cannot change while it is running are referred to as constants.…
Q: Provide the asymptotic characterization of the following recurrence relation using the Master…
A: Given equation: T(n)=2T(n4)+34n3+42 To do: Apply master theorem
Q: Exercise 6.2 Explain how the following steps are performed in JDBC: 1. Connect to a data source. 2.…
A:
Q: Mr. Yoyok has children Ani and his wife is dead. Mrs. Tatik has a child Tedi and her husband already…
A: According to the question, we have to prove the statement using the method inference that Ani and…
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: When illustrating professional ethics, use examples from real-world situations. way you understand…
A: Introduction: Professional ethics are values that guide how an individual, organisation, or team…
Q: Explain top-down analysis with an example.
A:
Q: It would be helpful to describe the procedures required in project management using an example, but…
A: Given: In project management, a process is an activity that has a specified place in the project's…
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: Part (2) Write a Java application that asks the user to enter the length and width of a room and the…
A: JAVA Program: import java.util.Scanner; // Defining the class RoomCarpetclass RoomCarpet{ private…
Q: 14.20 Suppose there is a relation r(A, B, C), with a B+-tree index with search key (A, B). 14.21 a.…
A: Solution: 14.20. a) In terms of the number of records retrieved n1 and height h of the tree, the…
Q: Kruskal's MSP algorithm has running time in terms of number of vertices n with number of edges k n…
A: “Since you have asked multiple questions, we will solve the first question for you. If you want any…
Q: Discuss the distinction between symmetric and asymmetric multi-processing techniques.
A: MULTIPROCESSING: In computing, multiprocessing is a method of operation in which two or more…
Q: Find a closed form representation for the function defined recursively by f(0) = 5 and…
A: Find a closed form representation for the function defined recursively by f(0)=5 and f(n+1)=3f(n)+4.…
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: Where may computer science and other study disciplines intersect? What are their steps?
A: At its core, computer science is an area of study concerned with data and data processing. If…
Q: This is a third time to uploading question every time expert giving wrong answer. R Code 1. Take…
A: in r. We need to plot the confusion matrics and print the accuracy of model. See the below steps.
Q: Is access to the internet helpful for those who have impairments, whether those impairments be…
A: Here is the solution:
Q: Write the salient operating system. features of NIX
A: Dear Student, The salient features of UNIX operating system is given below -
Q: According to Thorndike, what would most likely be the behavior of a pigeon that you confine in a…
A:
Q: The following table gives the return from 3 activities when 0,1,2,3,4 dollars are invested in each…
A:
Q: Explain top-down analysis with an example.
A: Answer:
Q: A bank wishes to record the account number of its clients (an 8-digit number) on magnetic stripe ATM…
A: Answer: We need to write the function of magnetic strip on the ATM
Q: What do you mean by software? Write the difference between application software and system software.…
A: Software is programs and other routines for the computer system to make it run. The examples of the…
Q: Q4// writ C++ program to find the sum of first n natural numbers.
A: Sum of first n natural numbers is given by n(n+1)/2
Q: Why would making the security infrastructure open to everyone with a need for it be a bad idea?
A: Why would making the security infrastructure open to everyone with a need for it be a bad idea ?…
Q: (b) Write the flowchart and C program to compute the decay constant K = 2.303 t log No N
A: PROGRAM INTRODUCTION: Include the required header files. Start the definition of main function.…
Q: What do you mean by the me computer? Delineate the
A: Memory Of A Computer Memory is a device or system that is used in computing to store information for…
Step by step
Solved in 2 steps with 1 images
- In Java: Implementing a Superclass Employee Part 1: Implement a superclass Employee that has the following fields and methods. Fields: string firstName string lastName int employeeID double salary Methods: constructor method - initialize salary field to zero. setters and getters for firstName, lastName, and employeeID employee Summary method - prints all account attributes Part 2: Implement a Manager class that inherits from the Employee class. Fields: string department a Methods: employeeSummary method - prints all superclass and subclass attributes Ensure that your program has the two required classes and a test class.using python language Suppose a call center has three levels of employees—respondent, manager, and director. An incoming telephone call must first be allocated to a respondent who is free. If the respondent cannot handle the call, the call must be escalated to a manager. If the manager is occupied, then the call should be escalated to a director. Design your own classes and data structures for this problem. Implement a method dispatchCall() that assigns a call to the first available employee.Create a class Animal Create a class Cat, and a class Dog, and a class Bearded Dragon which extend Animal. Add to your Animal class: Member: name Methods: Public Animal (String name) //constructor public void makes Sound () with the implementation printing out a generic animal sound. Next, override (add) the makes Sound() method to your Cat and Dog class, with the implementation specific to each animal (i.e, cat says purr..). Do not override the makesSound() for your Dragon (bearded dragons don't make sounds!) Note, you'll also need a constructor in each of your subclasses which calls super(name) to initialize the common 'name' member of Animal. Next (in your test harness) create a List of different Animals ( a couple cats, a dog, a dragon... ) and add these Animals to your list. Iterate through your list & call makeSound on each. (you should observe the makeSound method called will be: cat -> from Cat class, dog-> from Dog class, bearded Dragon -> from Animal class ) EC:…
- Please write code in JAVA Step 1: An Account class stores a current balance, and provides getBalance, deposit, withdraw, and toString methods in addition to at least one constructor. Add an account class to the project.Step 2: A CheckingAccount class extends the Account class and has additional attribute overdraft limit and additional method chequeDeposit. Implement the CheckingAccount class in the project. Make sure you add a constructor to the class.Step 3: Override the toString method in the CheckingAccount class to add the overdraft limit as well to the returned string.Step 4: A SavingsAccount class extends the Account class and has additional attribute interest rate and a method named addInterest to calculate and add the interest to the account. Implement the SavingsAccount class in the project. Implement the SavingsAccount class in the project. Make sure you add a constructor to the class.Step 5: Add a test class named AccountTester to the project and implement a main method in…Java- Suppose that Vehicle is a class and Car is a new class that extends Vehicle. Write a description of which kind of assignments are permitted between Car and Vehicle variables.Implement the following using JAVA: a.Design a class named Person and its two subclasses named Student andEmployee. b.Make Faculty and Staff subclasses of Employee. Please note that,● A person has a name, address, phone number, and email address. A student has aclass status (freshman,sophomore, junior, or senior). You can define the status as aconstant.● An employee has office & salary.● A faculty member has office hours and a rank.● A staff member has a title. c. Draw a UML diagram of the system.
- JAVA A company needs to develop an object-oriented library with a few Java classes forthe following task. Overall, they want the classes to model the geometric shapes and calculatetheir areas. These geometric shapes include Square, Rectangle, Circle, and Triangle.The above four shapes share common attributes such as name and color. The area of a shapecan be calculated by using a method area( ) which can be implemented only until the exactshape is known. Different shapes need a different area( ) method.1) Design a Java abstract class called Shape to model this situation, which will serve as a parentclass. Write its code;2). All the above shapes should be drawable by the users by calling the draw( ) method.Different shapes are drawn differently. You should design a Java interface named Drawableto provide this method for the shape classes to implement in their own ways. Write its code;3). Write the code for the four classes: Square, Rectangle, Circle, and Triangle.Note:• You should decide…Using python: Suppose a call center has three levels of employees—respondent, manager, and director. An incoming telephone call must first be allocated to a respondent who is free. If the respondent cannot handle the call, the call must be escalated to a manager. If the manager is occupied, then the call should be escalated to a director. Design YOUR OWN classes and data structures for this problem. Implement a method dispatchCall() that assigns a call to the first available employee.Java Problem A shop sells beverages. A beverage has a brand, the ingredients, a codebar number, price, production date and expiration date. A beverage belongs to a company that has a name, an address, a phone number and an email. The shop employees want to check automatically the stock of beverages. All expired or sold beverages need to be eliminated. Implement the Shop, Beverage and Company classes. Implement the needed interfaces and methods for the classes. The shop has a method which specifies how many times does each ingredient appear in the whole collection of beverages. Create a main method which tests the program with relevant data based on data which is read from a file and output the beverages which are out of stock in a file.
- Java - Interface 1. Create an interface Employee which has the attribute: rate, and the method getSalary(). 2. Implement the Employee interface with two classes: Hourly and Commissioned. 3. Hourly employee has the following additional attribute: hoursWorked. Hourly wage is 300 money. 4. Commissioned employee has the following additional attribute: itemSold. Commissioned employees get 200 money per item sold. If item sold is greater than 100, any items sold after 100 has +10 money bonus. Inputs 1. First line contains the type of Employee (H or C) 2. Second line is for the hours worked or the items sold depending on the type of employee Sample Output Enter type of employee: H Enter hours worked: 10 Salary: 3000Use java programming language 1.1 Create a Student Object project. Create a Student class and use the provided UML diagram to code the instance fields, constructors and methods. Note: The module mark is the average of the participation mark and the examination mark - calculate this using the calcModuleMark() method. The determineStNumber() method should compile a student number with the first 3 letters of the student's name, a '#' symbol, and a 3-digit randomly generated number (make use of a for-loop to concatenate these 3-digits). The stNumber data field should be set in the constructor by calling the determineStNumber() method. The toString() method must compile a string to display the student number, participation mark, examination mark, and module mark, formatted in table format. Student number PMark EMark MMark Mar#9186 81 64 72.00 1.2 Create a testStudents class. Do the following: -Write a static method called display() which receives…Java Program The assignment requires two classes. Put all classes in the same package. Class Employee Attributes (all private): id: String lastName: String firstName: String salary: int Methods: Parameterized constructor for initializing a new Employee instance Getters for all attributes toString method to display an Employee's attributes (See output of executable below) Executable Class Create an array of at least eight Employee objects. Be sure to use many with identical last names, but don't order them by name in the array. Create an ArrayList from the array. Sort the ArrayList first by last name and then by first name. Using the forEach method and a lambda expression, print all employees alphabetically sorted by name. Create a LinkedList from the ArrayList. Create an iterator capable of cycling both forward and backward through the LinkedList. Iterate forward through the LinkedList without generating any output. Then iterate backwards through the LinkedList to print…