There are multiple geometric shapes available. a. You have to organize the maximum number of shapes into appropriate level of inheritance. For example, all the squares are quadrilateral, and all the quadrilateral shapes are 2D shapes, and all the 2D shapes are shapes, just like that create a shape hierarchy. b. Create a UML class diagram for all the shape hierarchy you created in step a. Your UML class diagram should represent all the structure of classes and the relationship between classes. c. Explain the four basic OOP concepts in context of above shape hierarchy and highlight the advantage of using each of these OOP concept.
Q: How response teams determine the severity of an incident
A: The core security incident response team (CSIRT) uses a variety of methods to determine the severity…
Q: I am unable to get the same output, The powerball number has to be align with the ticket number as…
A: I have given the correct code with some changes Output screenshot is also given
Q: Explain What Is Error Control?
A:
Q: What is Empirical Analysis?
A: Given: Explain empirical analysis.
Q: Determine an equation to predict metabolism rate as a function of mass based on the following…
A: We have to write MATLAB code for the given question.
Q: Write java code that recursively calculates the Sum of the array cells. Program requirements: Create…
A:
Q: Suppose you are hired to design a reliable byte-stream protocol that uses a sliding window (like…
A: We need to find the number of bits in advertised window and sequence number fields of the protocol…
Q: What is Minimum Cost Spanning Tree?
A:
Q: in StudentInfo.txt below. Assume the number of students is at least 1 and at most 20. The program…
A: Dear Student, As no programming language is mentioned I am assuming it to be C++.
Q: llowing implications correct? (a) (A ⇒ C) ⇒ (A ∨ C ⇒ B ∨ C) (b) (A ⇒ B
A: Introduction: A tautology is a compound statement that is true regardless of how the separate claims…
Q: What is need for finding minimum spanning tree?
A:
Q: algorithm LargestShortestWeight(G, s,t) pre-cond: G is a weighted directed (augmenting) graph. s is…
A: The answer is given in the below step
Q: List the applications of minimum spanning tree?
A: A spanning tree in which the total sum of the weight of thr edges is the minimum as it can be…
Q: What is a trigger in SQL?
A:
Q: What is the sub-network address if the destination address is 200.45.34.56 and the subnet mask is…
A: Introduction In this question we are asked about the sub network address if the destination address…
Q: The coordinates of centres of these squares are (x1, a/2), (x2, a/2) and (x3, a/2) respectively. All…
A: Input-Output Format: The first line of the input contains a single integer T denoting the number of…
Q: 1. If m = 5 & n=10, their gcd = 5 2. If m = 11 & n = 7, their gcd = 1 3. If m = 15 & n = 10,…
A: SummaryGreatest Common Divisor or gcd is a formula for finding the largest number that divides both…
Q: In the above class (MyClass), overload __add__, __eq__, and __lt__ operators as follow:
A: As per question statement, It is asked to add code to overload operators.
Q: Example 2.21 (Expectation of an Exponential Random Variable) Let X be expo- nentially distributed…
A: The question has been answered in step2
Q: how to write those functions recursivly for a BST C++.Also determine if the root's data appears in…
A: Given an array of integers, the task is to construct a binary tree in level order fashion using…
Q: Define lexemes and aparser ? Lexemes are derived from the source code, how do they become tokens?…
A: Introduction A language unit could be a sequence of characters within the computer program that…
Q: Write -19 as: a. 2's complement value with the smallest number of bits possible b. 8-bit 2's…
A: The complete answer is below:
Q: class ProgLang String pName; // represent its name protected int pCode; // represent its Code…
A: Answer is below:
Q: How machine learning is used in real-world situations?
A: Answer:
Q: Consider the subnet in Fig. 3.11.5. Distance vector routing is used and the following vectors have…
A: The given data is, The vector from B to C = ( 5, 0, 8, 12, 6, 2) Going via B with a delay gives…
Q: There are N local news outlets in the Ajobcity of Ajobdesh. All of these outlets are connected to…
A: # problem is to find the minimum of the maximum of the # distances from a and b to all other nodes…
Q: #7 Please you must use the same main function code as exactly in the line 6. Because the codes in…
A: The algorithm for the program is as follows: 1. Input the number of .txt files and the all.txt files…
Q: What is known as Dynamic loading?
A:
Q: Show that the set of infinite subsets of natural numbers is uncountable
A:
Q: Create a file yul.cpp with the main function that asks the user to enter the information to create…
A: According to the information given:- We have to follow the instruction in order to get desired…
Q: What is binary search?
A: Introduction In this question we are asked about the Binary Search
Q: 2- From the following tables write a SQL query to find the departments with budgets more than Rs.…
A: We have to get the first name and last name from emp_details table and department details from…
Q: What is the sub-network address if the destination address is 200.45.34.56 and the subnet mask is…
A: The correct answer for the above mentioned question is given in the following steps for your…
Q: So I am enrolled in a "principles of programming course" and need help understanding these "side…
A: Solution: Side effects: Side effects are a major source of bugs. They also make code very…
Q: using oracle 4- From the following tables write a SQL query to display all the data of employees…
A: Please refer to the following step for the complete solution to the problem above.
Q: Explain What Is Meant By Paging and Give its Advantages.
A: Paging is a function of memory management where a computer will store and retrieve data from a…
Q: tch it inste
A: import java.util.*;public class Main { public static void main(String[] args) { String input = "";…
Q: Consider the subnet in Fig. 3.11.5. Distance vector routing is used and the following vectors have…
A: The following vectors will come in to router C From B: (5, 0, 8, 12, 6, 2): Here the measured delay…
Q: Write down Depth First Search traversal function?
A: The function takes the argument of the current node index, adjacency list (stored in vector of…
Q: This is a different question. Do not repost other solutions. The following contain the functional…
A: Answer : a) lossless join decomposition This is not satisfied because there is a loss of…
Q: Write a small piece of pseudo-code for generating a histogram H[L] for an intensity image…
A: histogram is a like bin count of intensity across the image
Q: A small organization is given a block with the beginning address and the prefix length…
A: INTRODUCTION: Only one requirement is placed on the number of addresses that make up a block, which…
Q: Differentiate Time Efficiency and Space Efficiency?
A: The process of creating a set of instructions that tells a computer how to perform a task is known…
Q: Find the class of the following address. a) 1.22.200.10 b) 241.240.200.2 c) 227.3.6.8 d) 180.170.0.2
A: Introduction: An individual machine within a particular organization is identified by its IP…
Q: In the attached Python code, use the array built to shuffle and deal two poker hands. Change the…
A: We need to write a Python code for the given scenario.
Q: A host was given the 192.168.2.64/27 IP address, indicate: i) Netmask of the network. ii) The…
A:
Q: this java class has a documentation comments describing the content to be added to it. Class Finder…
A: Question given - A Java Program Code skeleton is given. Add solution code in this program code as…
Q: Explain thoroughly the answers to the following questions: 1. What are the advantages and…
A: Given: Write the answers of the questions with explanation.
Q: Show that if signature is valid then v = r′ in DSA scheme Please send me the solution within 10…
A: The question is to show that if the signature is valid then v = r in DSA scheme.
Q: Explain what is Univariate, Bivariate, and Multivariate Analysis?
A:
OOPs
In today's technology-driven world, computer programming skills are in high demand. The object-oriented programming (OOP) approach is very much useful while designing and maintaining software programs. Object-oriented programming (OOP) is a basic programming paradigm that almost every developer has used at some stage in their career.
Constructor
The easiest way to think of a constructor in object-oriented programming (OOP) languages is:
Step by step
Solved in 8 steps with 7 images
- You are asked to design a software system to track an automobile manufacturing line. You will need to track the following components (wheels, brakes, engines and cooling systems). What would be the relationship best suited to describe the relationship between these components and the car? O A. inheritance B. composition O C. association O D. aggregation O E. polymorphismThe world of shapes is much richer than the shapes included in the inheritance hierarchy of Fig. 11.3. Write down all the shapes you can think of—both two-dimensional and three-dimensional—and form them into a more complete Shape hierarchy with as many levels as possible. Your hierarchy should have the base-class Shape from which class TwoDimensionalShape and class ThreeDimensionalShape are derived. [Note: You do not need to write any code for this exercise.] We’ll use this hierarchy in the exercises to process a set of distinct shapes as objects of base-class Shape .You are building a system for a Housing Society, such as Bahria Town. You are supposed to design a system that allows them to keep a record of how many blocks, sectors, streets, and houses the society has. Your system also generates unique names for blocks and sectors, and unique numbers of streets and houses. You must design the class structure yourself. 25 marks in this lab are for good class structure and good decisions regarding inheritance/composition.A society has many blocks, each block has many sectors, each sector has many streets, and each street has many houses. The society has a name, each block has a name (an alphabet), each sector has a name (an alphabet), each street has a number, and each house also has a unique house number.When your program starts:• It asks the user the name of the Society as well as the City in which it is located. Your program should be able to handle input that has more than one words.• Then, it asks the user how many blocks does this society has.…
- You are building a system for a Housing Society, such as Bahria Town. You are supposed to design a system that allows them to keep a record of how many blocks, sectors, streets, and houses the society has. Your system also generates unique names for blocks and sectors, and unique numbers of streets and houses. You must design the class structure yourself. 5 marks in this lab are for good class structure and good decisions regarding inheritance. A society has many blocks, each block has many sectors, each sector has many streets, and each street has many houses. The society has a name, each block has a name (an alphabet), each sector has a name (an alphabet), each street has a number, and each house also has a unique house number. When your program starts: • It asks the user the name of the Society as well as the City in which it is located. Your program should be able to handle input that has more than one words. • Then, it asks the user how many blocks does this society has. Let’s say…You are given a template to help you follow the required structure. There are 10 files for the base and derived classes with specification and implementation files You are also given a driver MagicalCreaturesMain.cpp that you will complete. So 11 files in all. MagicalCreatureHeader.h // given to you MagicalCreature.cpp // given to you ElfHeader.h // given to you Elf.cpp // you implement methods DragonHeader.h // given to you Dragon.cpp // you implement methods GoblinHeader.h // given to you Goblin.cpp // you implement methods GenieHeader.h // given to you Genie.cpp // you implement methods Specifications: Here are five UML Diagrams: One for the Base class and the others for the derived classes. Use these along with the given template to complete the design of the classes and create the application. The template contains comments and notation as to where you need to fill in the code;…You have to implement program that compares graduate students based on their ranks. The design of the program is given in the following UML diagram: • Student class: Base class that GradStudent extends. • GradStudent class: The objects from this class will be used for comparisons. • Rankable interface: Defines the implementation needed for comparison. GradStudent implements this interface. • Test class will be used to get student information from the user and demonstrate the comparison of students.
- Scenario:You are hired by a game development company. Your task is to create an RPG hack & slash console game. The game will have a movement system that will be based on the x, y, z coordinate system. You will need to start with creating 3 classes.1. A class that represents a player2. A class that represents an enemy3. An abstract class that contains the movement logic.Step 1:Start by creating the superclass which defines the movement system for both enemy and player. The movement system is based on the Coordinate system. Imagine an x, y, z plane, the y coordinate is used to move forward and backward in the virtual plane, x to go left and right, z to go up and down.For example, A player with coordinates x, y, z with values -5, 10, 0 represents a player -5 units to the left, 10 units forward, and 0 z units mean on the ground. (0, 0, 0) are the base units which means the player or enemy is at the start of the level.Step 2:Create a class to represent the player which is derived from…Consider the following scenario: A chicken, eagle and duck are birds. A dog, cat, cow,and lion are animals. Human and Birds are also animals. Peas, carrots, and grass areplants. Chicken, duck, cow, and plants are edible. Draw a class diagram for the abovescenario. You can use classes, inheritance, interfaces, and associations (includingcomposition or aggregation) when needed. You shouldn’t use operations.In-class Assignment Day 8 You should draw the hierarchy for your classes to understand how the coding should be structured. Be sure to notate any classes that are abstract. Write an abstract class for Shape. The intended subclasses are Polygon, Circle, Triangle, and Rectangle. All of these will have a name, an area, and a perimeter. (Consider which methods might be abstract.) Add a toString method that will return the information about the Shape, for example: Triangle, Area: 7.5, Perimeter: 12.0 Write the class Rectangle. A Rectangle is a Shape and should have a width and a height. When a Rectangle is outputted, it should read: Rectangle, Length: #, Width: #, Area: #, Perimeter: # Write the class for Circle. Every circle is a Shape that has a radius. Be sure to provide an accessor method (getter) for the radius. When a circle is outputted, it should read: Circle, Radius: #, Area: #, Circumference: # Write a TestShape class that has the main method, which creates…
- We are working in 2D and programming in C#. Create a Point class to represent points in 2D. Create an abstract base class named Shape. It should have a position property as a Point. It should be designed as having Move and Resize methods. Create a Line class using Points, derived from Shape class. Its position should be the center of the line. Create a Polygon class representing a closed polygon of Lines, derived from Shape class. Note that, at construction time, Lines may not be provided in order. The continuity and number of the lines should also be checked for a properly closed Polygon. All geometric entities should be moveable. All shapes should be resizable without changing their central positions. All shapes' positions should be their centroids. Shapes should have areas calculated. Write an example C# Console code to demonstrate your program's abilities.Scenario:You are hired by a game development company. Your task is to create an RPG hack & slashconsole game. The game will have a movement system that will be based on the x, y, zcoordinate system. You will need to start with creating 3 classes.1. A class that represents a player2. A class that represents an enemy3. An abstract class that contains the movement logic.Step 1:Start by creating the superclass which defines the movement system for both enemy andplayer. The movement system is based on the Coordinate system. Imagine an x, y, z plane,the y coordinate is used to move forward and backward in the virtual plane, x to go left andright, z to go up and down.For example, A player with coordinates x, y, z with values -5, 10, 0 represents a player -5units to the left, 10 units forward, and 0 z units mean on the ground. (0, 0, 0) are the baseunits which means the player or enemy is at the start of the level.Step 2:Create a class to represent the player which is derived from the…In this exercise, you have to perform composition between the Toyota class and its Engine! Problem Statement# You have to create a Toyota class which inherits from a Car class, and is composed of an Engine Note: You already know that in such a composition relation, the oyota class will be res ible for Engine's lifetime. Consider this diagram for reference Car - id: int model: String - color: String + carFeatures(): void +setModel(): void + setColor(): void Toyota ToyotaEngine **** start): void stop): void . ..... + setStart(): void Part of- Car, Toyota and ToyotaEngine: Class Representation You should implement the Toyota class as the child class of the Car. It should have an instance of ToyotaEngine and a setStart() function which in turn calls the start () function of the ToyotaEngine class. The start () and stop () functions of ToyotaEngine class simply print out on screen that the engine has been started/stopped.