Write a program to find the area of a rectangle, square and triangle using abstract class.
Q: -Given the binary min-heap A = [1, 60, 18, 83, 97, 68, 47, 99] do the following: (a) Draw the tree...
A:
Q: Networks that use packet switching: a) Are very sluggish, frequently taking up to 24 hours to rel...
A: Introduction Packet switching network: Packet switching is a process by which information is first d...
Q: Consider the alphabet set Σ = {a b}; Write Regular Expressions for the following definitions. 1. Lan...
A: Language of All those words which do not contains double a’s : Words Included : {∈, a, b, ab, ba...
Q: How many variables are recognized as categorical variables by R? A.) 9 B.) 8 C.) 7 D.) 6
A: 9 variable are recognized as categorical variables by R.
Q: 't missing anything before implementing this. Which of the following statements is true about what M...
A: given - Megann Foxx wants to implement internet telephony via VoIP for her business. Megann is askin...
Q: You are having a conversation with one of your friends about your internet, and they tell you that a...
A: Solution:
Q: Write a python program that that chooses among two alternative unary operations on a real number ent...
A: The absolute value of a real number is defined as the value of the real number without any sign or w...
Q: What is the definition of page fragmentation ?
A: Introduction: Fragmentation is an unwelcome condition in the operating system in which processes are...
Q: Examine the benefits and drawbacks of switching from a custom data generation solution to an enterpr...
A: The "conversation" between consumers and businesses may be predicted and influenced by artificial in...
Q: Question: Write a program to Simulate a game of tic tac toe. A game of tic tac toe has two players....
A: Program.cs: using System; using System.Collections.Generic; using System.Linq; using System.Text; ...
Q: Problem 4 Use the described in class greedy algorithm to find a 3-clustering with maximal spacing fo...
A: What Is A Greedy Algorithm? A collection of resources is recursively partitioned in the Greedy Algo...
Q: Please write it in Python Write a delete function that takes as an argument a list l and an elem e...
A: Python Code: def delete( l, x ): l.remove(x) return x Explaination : Define a function de...
Q: Write a PIC18 instruction sequence to initialize the contents of file registers at addresses from 0x...
A: I have answered this question in step 2.
Q: What are you going to do if there is no Functional Spec, or any documents related to the system and ...
A: Introduction: The high attrition rate in Indian organisations, this is regrettably a common occurren...
Q: 3. A certain CS professor gives 100-point exams that are graded on the scale 90-100:A, 80–89:B, 70-7...
A: Ans: Code: score = int(input("Enter the exam score:"))if score > 90 and score < 100: print(...
Q: Why is it that CDMA allows users to communicate at the same time while using the same frequency band...
A: Introduction: Users in the CDMA technique are identified from one another based on their CDMA codes....
Q: Distinguish between DNS record types. Give examples and arguments for utilising each one. Is it feas...
A: Intro DNS Types: Address Mapping record (A Record)—also known as a DNS host record, stores a hostnam...
Q: What are the fundamental elements of a wireless network?
A: Introduction: In a wireless network, data is exchanged between the source and destination devices vi...
Q: Explain why software testing should always be a tiered and progressive process. Is it true that prog...
A: Software trying out is a way of figuring out whether or not the real software program product meets ...
Q: What distinguishes social engineering from other types of attacks?
A: Introduction: The skill of obtaining sensitive information from individuals is known as social engin...
Q: The problem is from Introduction to Programming and Data Structures with C++, 4th edition (Algebra:...
A: Program Explanation: Declare the header files Define the main function Declare three variables a,...
Q: In the software business, the phrases "cohesion" and "coupling" are sometimes used interchangeably.
A: Introduction: The degree of reliance between software modules is referred to as coupling in software...
Q: Let T1, T2 be 2-3-4 trees and let x be a key [in neither T1, T2], such that for each pair of keys x1...
A: Let T1, T2 be 2-3-4 trees and let x be a key [in neither T1, T2], such that for each pair of keys x1...
Q: Implement InsertionSort function either iteratively or recursively: For iterative implementation: ...
A: I give the code in C++ along with output and code screenshot
Q: A common measure of transmission for digital data is the baud rate, defined as symbols (bits in our ...
A: The handwritten answer is below:
Q: Essentially, if we want to trace the dependency and precedence paths of each input or calculation, a...
A: A node in a network has dependencies and paths. The precedence paths are those which have a dependen...
Q: ate class methods (Setters and Getters) that load the data values. The Setter methods will validate ...
A:
Q: I want to move all the vowels of a user entered string to the left side and move all the consonants ...
A: Here in this program we are asked to print vowels on left hand side and consonant on the right hand ...
Q: How can I take out data from the get request in JavaScript. Assume the get request has email and pas...
A: Required:- How can I take out data from the get request in JavaScript. Assume the get request has em...
Q: Write a program that asks the user for strictly positive numbers and stores them in a list. The inpu...
A: Please find the answer below :
Q: Given a set of n points, the greedy K-center algorithm takes ___ time. Group of answer choices A. ...
A: Please refer to the following step for the complete solution of the problem above.
Q: Describe the importance of database design. designing a legacy application
A: Introduction: It is a database structure used for data planning, storage, and management. The design...
Q: ual testing?
A: given - What part does documentation play in manual testing?
Q: Auditing and verifying a formula that contains embedded references to multiple worksheets is difficu...
A: Auditing and verifying a formula is very important that contains embedded references to multiple wor...
Q: What is the purpose of flow control? Describe the most popular ways to flow control at the data conn...
A: Flow control not only monitors but also synchronizes the data transfer rate by responding to incomin...
Q: If you select cell A1 and type =A1 in it, this would create an Excel ___________. Group of answer c...
A: Answer :
Q: Implement the following function without using any additional data structure, and without sorting th...
A: ANSWER:-
Q: What might lead a virus to spread throughout a company's computer network?
A: Introduction: Viruses propagate when infected software or documents are moved from one computer to a...
Q: On the basis of the following considerations, compare memory and registers in tabular form. Descr...
A: Intro The question is about Difference between memory and registers in tabular form on the basis of ...
Q: Is the SSL protocol enough to ensure network security?
A: Introduction: SSL is fantastic, but it is simply insufficient. Interception of data packets passing ...
Q: Write a program that counts the number of words in a sentence entered by the user #PYTHON
A: Please find the answer below :
Q: n with regar
A: given - Explain the concepts of convergence and contagion with regards to a jump-baiting incident
Q: Which of the following represents “quadratic" time?
A: Introduction:- Quadratic functions can be represented as, y1(x) = a1x2 + b1x + c1, where a1, b1, and...
Q: A1 5 Ardwino UNO P 51 H. 83U-1000P RESTE 01/2 17 OREF2 S2 20 21 D3U-1000P RI 4.7 > 220 R3 220 13 In ...
A: in the above image , what is the function of R3 ? current - limiting resistor pull-up resistor pull ...
Q: What does the following code display? String s = "What we think, we become"; String s1 = s.substring...
A: Here in this question we have given a code segment and we have asked to find the output of this code...
Q: A drinks machine can accept 10p and 20p coins only. Coffee costs 50p and tea costs 40p. Draw a CCS m...
A: Drinks machine can accept only 10p and 20p. Coffee costs - 50p Tea costs- 40p
Q: Write a program that will calculate course and overall final mark (averages). You write a universal ...
A: Step 1 : Start Step 2 : Define an array to store the marks. Step 3 : Define the pointer and set the ...
Q: Find the maximum number of comparisons to be made to find any record in a binary search tree which h...
A: The Handwritten answer is below:
Q: Please help Write a short response about the YouTube algorithm that makes people addicted. Not essay...
A: Algorithm: A finite sequence of steps/instructions to solve a problem. Algorithm design is a problem...
Write a
rectangle, square and triangle using abstract class.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
- In this problem you will implement a simple library system based on object-oriented approach (using inheritance, polymorphism and abstract classes). At the library we have items and people are allowed to borrow them for a while or use them in the library premises. We have 3 types of items at the library. Books, Magazines and Compact Discs (CDs). All items have a unique number called serial number, shelf number that the item put on that shelf and shelf index, the index of the item at the shelf. Items at the library have additional different properties changing to item type. For example books have name, publisher name, and author name. CDs have title property and magazines have name, publisher properties. But people are allowed to borrow only books and CDs, but not magazines. Suppose that two kinds of people using library items. These are students and academic staff. Students can borrow only one item at a time, and academic stuffs can borrow at most 3 items at the same time. Also people…Create an interface Wheel with methods setWheels (int c) and getWheels () and a class Vehicle with abstract methods getColor () and getBrand (). Now, create a concrete class Taxi with additional method setDriver (String name) that inherits both Wheel and Vehicle. (Note: Concrete classes don’t have any abstract method)Write a program that draws a perfect centered star using functional programming. Must use the AffineTransform and Ellipse classes.
- 1. I Love Shapes by Codechum Admin Shapes are the best thing in the world! We see them everywhere, from triangular pizza pies to her perfectly shaped almond eyes ? For this program, you are tasked to implement the Shape class. This class should be an abstract class and should have the following properties: private String name private String color private boolean isFlat It should have a constructor with the following signature, public Shape(String name, String color, boolean isFlat), getter methods for all the properties, and a setter method for the color. Then implement two more abstract classes that inherit from this Shape class: TwoDShape and ThreeDShape. The TwoDShape will have the following additional details: Additional property: private int numberOfSides Additional methods: getter for the numberOfSides public abstract double getArea() public abstract double getPerimeter() Constructor with the following signature: public TwoDShape(String name, String color,…Given below is a Rectangle class consisting of an upper left coordinate and a lower right coordinate. class Rectangle { int upperLeftX; int upperLeftY; int lowerRightX; int lowerRightY; } Since the upper left coordinate and lower right coordinate comprise of points, how would you modify the definition of the Rectangle class to include these points in your class?Write Java classes to solve the following problem: A company has two types of employees. These are called Exempt and NonExempt. Exempt means the employee is not eligible for overtime pay and is paid a fixed amount each pay period. NonExempt means the employee is paid by the hour and receives 1.5 times the hourly rate for hours worked over 40. Each Employee has an id number which is a string. They also have a name. Employee should be an abstract class with the member variables described in number 2. Employee should have an abstract method called findPay, a toString method, and it should implement the Comparable interface. Use alphabetical order of id number to determine less than, greater than, and equal to. The toString method should produce a string like the following: Emp: ID: 4590 Emp Name: Fred Jones Employee should have an equals method. Define two employees to be equal if they have the same name and the same id number. Provide accessor and mutators for Employee. NonExempt should…
- Java - Encapsulation A rectangle can be formed given two points, the top left point and the bottom right point. Assuming that the top left corner of the console is point (0, 0), the bottom right corner of the console is point (MAX, MAX) and given two points (all “x” and “y” coordinates are positive), you should be able to draw the rectangle in the correct location, determine if it is a square or a rectangle, and compute for its area, perimeter and center point. To be able to do this, you should create a class Point (that has an x-coordinate and a y-coordinate). Also, create another class called Rectangle. The Rectangle should have 2 points, the top left and the bottom right. You should also implement the following methods for the Rectangle: display() - draws the rectangle on the console based on the samplearea() - computes and returns the area of a given rectangleperimeter() - computes and returns the perimeter of a given rectanglecenterPoint() - computes and returns the center point…1. We have to calculate the area of a rectangle, a square and a circle. Create an abstract class 'Shape' with three abstract methods namely 'RectangleArea' taking two parameters, 'SquareArea' and 'CircleArea' taking one parameter each. The parameters of 'RectangleArea' are its length and breadth, that of 'SquareArea' is its side and that of 'CircleArea' is its radius. Now create another class 'Area' containing all the three methods 'RectangleArea', 'SquareArea' and 'CircleArea' for printing the area of rectangle, square and circle respectively. Create an object of class 'Area' and call all the three methods. 2. Repeat the above question for 4 rectangles, 4 squares and 5 circles. Hint- Use array of objects.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.
- JAVA - PersonWrite the classes as shown in the following class diagram. Add a tester where you make an array of 5 person and ask the user to enter them. Then loop over the array and print them. The user may enter a Student, a Staff or even a Person. The ‘-‘ symbol means private field or method and ‘+’ means public. The classes Student and Staff inherit from PersonUse java to write a test program that creates an array of 4 Worker objects. For each object, display theworker’s information and also his/her monthly salary. Both the HourlyWorker and SalariedWorker classes are required to provide anoperation to calculate the worker’s monthly salary. The salaried worker is paid a monthly basic salary + allowance.An hourly worker is paid payRate * hoursWorkedImagine a publishing company that markets both book and audiocassette versions of its works. I it markets both book and audiocassette versions of its works. create a class called publication that stores the title (a string) and price (type float) and date of a publication. Provide getters/setters and constructor also write an abstract method isOversize() .From this class derive two classes: book, which adds a page count (type int); and tape, which adds a playing time in minutes (type float). Each of the classes should have a getter/setters and constructors and provide definition to function called isOversize() to the book and tape classes. Let’s say that a book with more than 800 pages, or a tape with a playing time longer than 90 minutes (which would require two cassettes), is considered oversize. You can access this function from main() and display the string “Oversize” for oversize books and tapes when you display their other data.