1. Design and use interfaces Write a class named Octagon that extends GeometricObject and implements the Comparable and Cloneable interfaces. Assume that all eight sides of the octagon are of equal size. The area can be computed using the following formula: area=(2+4//2)* side* side
Q: Explain the notion of locality of reference and the significance of this concept in memory systems b...
A: Step 1 The answer is given in the below step
Q: A combinational logic circuit has one output (F) and four inputs (a, b, c, and d). The circuit is de...
A: Ans.) abd and abc'
Q: The header and the module are the two most important portions of an EXE program when saved on disk.
A: EXE file (executable): In a Windows operating system, EXE refers to the extension of an executable f...
Q: In convert.py, define a function decimalToRep that returns the representation of an integer in a giv...
A: Given :- In convert.py. define a function decimal ToRep thatreturns the representation of an integer...
Q: Q2- Write a matlab program to read three numbers and print them in descending order. Use if statemen...
A: arr = []; for i = 1:3 num = input('Enter number : '); arr(end+1) = num; end t = 0; j = 3; for i=...
Q: by using "SWIFT" programming language(1OS) Assignment (1) •W rite a function called addString that a...
A: I have Provided this answer with full description in step-2.
Q: olve the following recurrence by method of backwards substitution A(n)=2A(n-1)+1 for n>1 , with ...
A: Answer : The complexity will be n.
Q: Given the following tables:
A: For the given query the answer or the result will be an empty set. The reason is given as below:
Q: cts specific, troublesome conditions, what types of notifications can you set it to deliver to your ...
A: given - If your network monitor detects specific, troublesome conditions, what types of notification...
Q: Explain each of the seven types of data instructions.
A: Data Instruction are the type of instruction which performs execution and operations on the data for...
Q: Explain your personal knowledge of In-House Development in your own words.
A: Answer : A group of individual dwellings or apartment houses typically of similar design are usuall...
Q: Is there a difference between associative and normal memory? Which is more expensive, and why is it ...
A: A typical associative memory experiment assesses participants' recollection of unrelated pairings of...
Q: Discuss how Python is used in Cybersecurity. Why is it important for students in the field of networ...
A: Cyber Security can be defined as a process using set of applications, with network and programming s...
Q: Express each of these mathematical statements using predicates, quantifiers, logical connectives, an...
A:
Q: Which VLAN is intended to allow administrators to access networking devices?
A: Introduction : The appropriate response to the questions is ("Management VLAN") "Virtual Local Area ...
Q: 4.) What are the negation statements of the following: a. There is an honest politician. b. All men ...
A: If the given statement is true, then the negation of the given statement is false. 4. a. Given state...
Q: the assignment operator is used to store results of a statement into a memory location by an identif...
A: Given :- the assignment operator is used to store results of a statement into a memory location by a...
Q: Explain the benefits of the Security Token Service( STS).
A: Introduction: Explain the benefits of the Security Token Service( STS).
Q: Bring Your Own Encryption (BYOE) as a kind of encryption is discussed.
A: Introduction: It is a cloud computing security approach that allows customers of cloud services to u...
Q: 3. For a (7,4) code, the parity matrix is given following 0 1 1 1 1 1. For an incoming information b...
A: U columns corresponding to the removed symbols are removed from the parity check matrix of the origi...
Q: Museum Visitor app Deliverable #5 Brainstorm with your team to develop a set of Class respon...
A: To reffer use case diagram is below
Q: You are setting up a home computer for a friend and you want to provide some firewall protection. On...
A: Given :- You are setting up a home computer for a friend and you want to provide some firewall prote...
Q: Why aren't technology improvements like computers and phones considered adaptations?
A: Introduction: The world is changing at a breakneck pace as a result of developing technology in ever...
Q: What are the advantages and disadvantages of the bit-vector format for sets? What other ways may set...
A: Introduction: We just check the matching bit to see if a given number is prime. This type of represe...
Q: Translate each of these nested quantifications into an English statement that expresses a mathematic...
A: a) ∃x∀y(x+y=y)The given expression ∃x∀y(x+y=y) is defined on set of all real numbers which denotes t...
Q: Which of the following was taught as a requirement about using PIVOT() queries place the highe...
A: Here First Know about PIVot() --In simple words using pivot convert data rows into columns.
Q: Is it possible to upload a file that is larger than 100 MB to Amazon S3?
A: Amazon S3 is a kind of bucket that is used to store objects which is scalable, durable and available...
Q: IL State and describe different components of grammar that need to be checked for a formal communica...
A:
Q: Assume that x is a char variable that has been declared and already given a value. Write an expressi...
A: The relational operators in C language are the operators that are used for comparing a value with an...
Q: Trace through what values are stored in each variable as the code executes and what values will be d...
A: 1. Asking the user to enter the country you live in,user enters Nassau. 2. Asking the user to enter ...
Q: Insert the missing part to call myMethod from main.
A: When we have to call the method we write method name. If there is parameter we pass parameter otherw...
Q: What exactly are smart pointers? What function do they serve?
A: Introduction: A Smart Pointer is a pointer wrapper class that has operators like * and -> overloa...
Q: Implement a function create_grade_list() with a string parameter representing space-separated grades...
A: The code creates a list of grades. The code then iterates through the grade_info and creates a new...
Q: What distinguishes proxy servers from NAT?
A: According to the question NAT are comes in the network layer branch and conduct the proxy applicatio...
Q: clude // size should not be negative typedef unsigne
A: 1. Input the binary number and convert it to binary array. 2. Declare an int array to store 4 bits d...
Q: What are the relative advantages and disadvantages of open source software versus proprietary applic...
A: What are the relative advantages and disadvantages of open source software versus proprietary applic...
Q: Describe the concept of Java bytecodes.
A: Introduction: A collection of instructions for the Java Virtual Machine is referred to as Java bytec...
Q: Discuss the merits and downsides of pointer and array interoperability in C.
A: Introduction: An array is a collection of items of the same kind. An integer array, for example, has...
Q: How l can open files txt in my computer
A: We can open txt file in Microsoft wordPad or Microsoft Notepad. To open the file first click on wind...
Q: How does a fiber-coaxial network differ from another?
A: Fiber optic cable: The wire is constructed of ultra-thin glass or plastic filaments as thin as human...
Q: pe o
A: Port scanning is a sort of scanning that can detect whether a server is running Telnet.
Q: What part of a network can offer less tight security, allowing a web server to be more accessible fr...
A: Your question is about less secure part of web server which is given below :
Q: How would you have a good communication if you are working as a remote coder from home?
A: How would you have a good communication if you are working as a remote coder from home?
Q: ype is equal to Visual Basic's Int
A: Below the Sql data type is equal to Visual Basic's Integer data type
Q: What are the two most major benefits of Software Defined Networks over traditional Hardware-based ne...
A: Introduction: Varied vendors make various claims, but the most common benefits of software-defined n...
Q: What is Patch Management's purpose?
A: Introduction: Patch management is the practise of keeping a network of computers up to date by deplo...
Q: Why is the CIA Triad in the shape of a triangle?
A: Why is the CIA Triad in the shape of a triangle?
Q: What is the definition of Function in C? In C, how many different types of Functions are there? Make...
A: The C language is a very popular language used in programming. It is a high-level language and is ea...
Q: 5.7 Clone of LAB: Arrays: Output numbers in reverse
A: Note: Programming language is not mentioned so I am doing in Java In this question, we are asked to ...
Q: Use induction to verify that T(n)=O(n^3) where T(n) ≤ 3T(n/2) + 4T(n/3) + n^3
A: The recurrence relation is a formula that describes a series based on a rule that determines the nex...
I need to create an uml diagram. from thr following question.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
- Exercise: Exercises Write a class named Octagon that extends GeometricObject and implements the Comparable and Cloneable interfaces. Assume all eight sides of the octagon are of equal length. The area can be computed using the following formula: The Octagon class has a private double data field named side with its getter and setter methods. The class has a no-arg constructor that creates an Octagon with side 0, and a constructor to create an Octagon with a specified side. Write a test program that creates an Octagon object with side value 5 and displays its area and perimeter. Create a new object using the clone method, and compare the two objects using the compareTo method. As far as classes go, the abstract GeometricObject class contains the abstract doubles getArea() and getPerimeter(). The programming language used in this exercise is Java, and it covers the Interfaces topic. I did get how most of the program should look like, but I'm facing trouble understanding a few…Java Write a class named Octagon that extends GeometricObject and implements the Comparable and Cloneable interfaces. Assume all eight sides of the octagon are of equal length. The area can be computed using the following formula: area = (2 + 4/(sqrt(2)) * side * side The Octagon class has a private double data field named side with its getter and setter methods. The class has a no-arg constructor that creates an Octagon with side of zero length, and a constructor to create an Octagon with a specified side. Write a test program that creates an Octagon object with side value 5 and displays its area and perimeter. Create a new Octagon object using the clone method, and compare the two objects using the compareTo method.Create the class DynamicArrayOfStrings that implements the following two interfaces
- Java - Polymorphism Create a class named “Shape” that has the abstract methods getArea() and getPerimeter(). Create classes named “Rectangle”, “Square”, and “Circle”. Override the methods getArea() and getPerimeter() with the right equation in getting the area and perimeter. For rectangle, create attribute length and width. For square, side. For circle, radius. Inputs 1. Char input for Shape type (R/S/C) 2. Dimensions of specific type of Shape C 5 Sample Output Shape(R/S/C): R Length: 10 Width: 50 Area: 500.00 Perimeter: 120.00Write a Program in Java Create an interface EnhancedShape that extends Shape and also requires a method public double perimeter( ) to be implemented by any class that uses the interface. (Note: Interfaces can inherit other interface just like a class by using extends keyword. Create a class file, an interface ehancedshape extends shape, and an interface shape file).Write a class named Octagon that extends GeometricObject and implements the Comparable and Cloneable interfaces. Assume all eight sides of the octagon are of equal length. The area can be computed using the following formula: area = (2 + 4/(sqrt(2)) * side * side The Octagon class has a private double data field named side with its getter and setter methods. The class has a no-arg constructor that creates an Octagon with side of zero length, and a constructor to create an Octagon with a specified side. Write a test program that creates an Octagon object with side value 5 and displays its area and perimeter. Create a new Octagon object using the clone method, and compare the two objects using the compareTo method.
- - Three interfaces ForTwoD, Shape and ForThreeD- TwoD class implements ForTwoD and Shape interfaces- ThreeD class implements ForThreeD and Shape interfaces- Four subclasses to TwoD (Circle, Rectangle, Triangle and Trapezoid)- Three subclasses to ThreeD (Cube, Tetrahedron, Sphere)-Implement the Shape hierarchy as shown in the above diagram- Basically, each two-dimensional shape needs to compute itsarea and its perimeter.- Each three-dimensional shape needs to compute its area(also known as surface area) and its volume.- Try to surf the internet to look for some formulas, for example, tocompute the areas, the surface areas, and the volumes … I did that tooA more detailed UML diagram is shown as follow: (Note that the #’s beforethe instance variables and the methods’ names mean “protected”) - Enum class defines some enum constants (various colors, feel free tochange)- The main interface should be the Shape interface consists of only oneabstract method, the area method. You can put some…Java program * Interfaces 1. Modify the class Rectangle to implement the Comparable interface, as shown in the following UML class diagrams. Apply the required changes in the class’s header.2. Then, in the Rectangle class override the method compareTo(), so if this object’s area is greater than the specified (given through the parameter) object’s area return 1, if it is less than return -1, and 0 otherwise. 3. Create a test class named Test2. Then complete the following tasks: a. Create an ArrayList and add to it 4 Rectangle objects with different width and height values. b. Print out the elements of the ArrayList. c. Sort the elements of the ArrayList using the static method sort of the class java.long.Collections. This would be possible only, if you implemented the method compareTo() correctly in the Rectangle class. d. After sorting the elements of the ArrayList, print the elements again. 4. Run the Test class. Here is the rectangle's class program public class Rectangle extends…only in java not in java c++ Create an interface EnhancedShape that extends Shape and also requires a method public double perimeter( ) to be implemented by any class that uses the interface. Create a class file, an interface ehancedshape extends shape, and an interface shape file.
- Write a Program in java Define an interface named Shape with a single method named area that calculates the area of the geometric shape: public double area(); Implement the Shape interface for Rectangle, Circle and Triangle class. Implement a class CalculateAreas that has a function that takes shape type array of objects and builds an array of (double values) values for each corresponding shapesDefine a Polygon interface that has methods area() and perimeter(). Then implement classes for Triangle, Quadrilateral, Pentagon, Hexagon, and Octagon, which implement this interface, with the obvious meanings for the area() and perimeter() methods. Also implement classes, IsoscelesTriangle, Equilateral- Triangle, Rectangle, and Square, which have the appropriate inheritance relationships. Finally, write a simple user interface, which allows users to create polygons of the various types, input their geometric dimensions, and then out- put their area and perimeter. For extra effort, allow users to input polygons by specifying their vertex coordinates and be able to test if two such polygons are similar ORIGINAL WORKS ONLYa package ParentPackage, define a class Code Tantra with the instance variables-student name, registration number, a float array of length 7 (to store the marks scored in 7 questions in TermEnd exam), total marks and percentage. Define a constructor that receives the name, registration number and an array of 7 marks and adds the top 5 marks and stores the sum in total marks in the same package, define a class Percentageclass with a method to calculate the percentage Define a subpackage ChildPackage" with a class GradeClass that inherits the PercentageClass and includes a method to print the count of S. A. B, C D E and 'F' grades, based on the percentage obtained(Java Code)