Object-oriented programming Create a class called Triangle that models triangles using three points (the vertices) for the x's and three points for the y's. The vertices will be of type double. It will have two constructors: one by default and one that creates a triangle from its three vertices. The class will also include a method to calculate the area and another to calculate the perimeter of the triangle. Attributes are of type public. Write here the class diagram and class code in Java
Q: What Presumptions Apply to Cybercrime?
A: the answer of the question is given below
Q: What is the use of boot block?
A: Introduction In this question we are asked about the boot block
Q: What variations exist between the TCP/IP and OSI protocol models? Make a case for your position…
A: The above question is solved in step 2 :-
Q: n the case of a data breach, how secure are cloud security systems? Can anything be done to prevent…
A: Answer is in next step.
Q: Explain how a system that was designed to support software variety might fail in the same manner…
A: Answer is
Q: What will be the final value in EDX after this code executes?
A: The answer is
Q: Think about this: Do you think marketing would have benefited from Big Data and Predictive…
A: Given: The phrase "big data" refers to the massive amounts of data – both structured and…
Q: The Dirtcheap Software Company is planning to produce an assembler for a computer with a 48-bit…
A: An assembler is a kind of computer program that takes basic computer commands and…
Q: The Mentcare system was created by modifying an information system that is readily accessible for…
A: Given: An information system that is already available was modified to create the Mentcare system.…
Q: What can be done to strengthen cloud security after a data breach? What are some potential ways to…
A: Introduction: A data breach is the purposeful or inadvertent removal of secure/confidential…
Q: The following table lists the character frequencies in a file. 6 7 8 9 char 0 1 2 3 4 5 freq 37 31…
A: Huffman's coding:- Huffman coding is a technique for data compression that does not depend on the…
Q: How is reuse and reconfiguration facilitated by the product line's basic application design?
A: Application Design: Business systems analysts and end users are surveyed for needs by the…
Q: Describe the meaning of "inversion of control" in terms of application frameworks. If you're…
A: Inversion of control is an abstract principle describing an aspect of some software architecture…
Q: Component independence means that one component should be able to be replaced by another that is…
A: This signifies that being resilient in your day to day strengthens your abilities to tackle greater…
Q: A common approach to system testing is to test the most essential functions of a system first,…
A: Definition: - In the context of the above system testing scenario, it is important to understand…
Q: Think about this: You are a software engineer who is presently working on a hospital's patient…
A: Introduction: Most of the time, software developers carry out the following duties:Prior to…
Q: Is there a reason why threads are regarded as "lightweight" processes? Does the amount of system…
A: 1) Processes are basically the programs that are dispatched from the ready state and are scheduled…
Q: When code is integrated into a bigger system, there could be problems. What part does configuration…
A: INTRODUCTION: Configuration management is a systems engineering procedure that ensures the…
Q: Tell us why magnetic tape is still in use at the location where it was located
A: Magnetic tape is basically used in storage of Data.
Q: 4. Based on the following image, the number of tables in the database is: A. One B. Two C. Three D.…
A: Based on the following image, the number of tables in the database is:
Q: It is theoretically possible, when using model-driven architectures, to create functioning programs…
A: To go through some of the present issues that prevent fully automated translation tools from being…
Q: b. Transform the following Entity relationship diagram to Relational Schema. ManName GSM ComiD…
A: Below I have provided a solution for the given question.
Q: What different logical layers can an application with a distributed client-server architecture have?
A: Introduction: The most typical distributed system architecture, known as client-server, divides the…
Q: Using K-map, Simplify the following Boolean expression in the SOP form. |F(A,B,C,D) = Σ (A'B'CD' +…
A: Below I have provided a solution for the given question.
Q: What feature unites all architectural designs geared at delivering software fault tolerance?
A: Introduction: Software architecture is the design of a software system. They include all of the…
Q: Explain A Convolutional Model for TF Binding.
A: We shall employ experimental data on a certain transcription factor. referred to as JUND An…
Q: During our discussion of memory consistency models, we said that a consistency model is a kind of…
A: Memory Consistency Models : Only two hard things in computer science: cache…
Q: Describe why testing a program's correctness against a formal specification is sometimes a more…
A: Testing a program's correctness against a formal specification is sometimes a more cost-effective…
Q: The SQL query given below will return the Nth highest salary from the employee table. The value of N…
A: Given: A SQL query is given in which the Nth max salary from the employee table is returned.…
Q: Operating systems go out of their way to ensure that a file's subsequent blocks are stored on…
A: To be determine: Operating systems make an effort to store contiguous portions of a file on…
Q: Given the SampleClass, what is the output of this code segment? SampleClass s = new SampleClass();…
A: 1) Code segment in question does below activity It defines a class SampleClass with two methods…
Q: 23 2 80-21 7 6 59 0 1 4 7 3 L-6 4 -1 2
A: Please kindly note that the determinant can be found only in a square matrix. If we try to find the…
Q: Software malfunctions may cause a lot of trouble for users. Is it moral for businesses to sell…
A: Software fails include bugs, ambiguities, oversights, or a misreading of the specification that the…
Q: Describe how a file management system may allow several users to access files in order to modify or…
A: Introduction: Explain how a file management system may provide many users access to files for the…
Q: What are your opinions on the most recent changes Google made to its search algorithms?
A: Explanation: Google employs several search algorithms to enhance search results and user experience.…
Q: Imagine that you had to implement the UNIX system on a microcomputer where main memory was in short…
A: In typical Unix installations, commands are entered at the keyboard and output resulting from these…
Q: 10. Draw a state diagram and display a transition table for the finite-state automation that accepts…
A: Solution:
Q: Give an example of how you would verify a built. Explain the function of any equipment
A: SummaryI've yet to see a system that doesn't validate password access, but that's where most testing…
Q: A compiler is a very complex program, and, like many complex programs, it is implemented as a few…
A: A compiler generally contains two phases they are , Analysis phase Synthesis phase
Q: → J I→ (J→K) J→ (KL) :.I→L
A: Given that I→J Prove that I→L
Q: Why is it so important for systems analysts to keep track of end users' requirements?
A: Introduction: The demands and functions that users desire to accomplish on the system are outlined…
Q: A and an NxN matrix B produces a 1xN matrix C. To determine the Nth element of C multiply each…
A: the c++ code is an given below :
Q: Give an example of how you would verify a password security system for a software you have built.…
A: Given: The project is a security system that provides password-protected users with only permitted…
Q: input using Scanner Program in java
A: JAVA USER INPUT : The user input using scanner class can be found in java.util.scanner. You can…
Q: Detecting Financial Fraud at Scale With Decision Trees and MLflow on Databricks
A: Detecting Financial Fraud at Scale With Decision Trees and MLflow on Databricks:-
Q: Consider the classification of access control methods. Discuss the many control options that each of…
A: Introduction: DAC, RBAC, and MA are the three main access control frameworks (MAC).Access control…
Q: Given the NFA below, trace its operation on each of the strings shown, and tell whether each of the…
A: Given the NFA below trace its operation on cach of the strings shown and tell whether cach of the…
Q: Is utilizing a mobile device a drawback? Are the savings on par with those of internet-based…
A: Introduction: Mobile technology : Mobile technology is the technology users can take with them…
Q: Think about this: Do you think marketing would have benefited from Big Data and Predictive…
A: Introduction: Big data describes vast, difficult-to-oversee amounts of organised and unstructured…
Q: Write a program to copy elements at position/index 1 and 2 from the following tuple into a new tuple…
A: code-…
Object-oriented
Create a class called Triangle that models triangles using three points (the vertices) for the x's and three points for the y's. The vertices will be of type double. It will have two constructors: one by default and one that creates a triangle from its three vertices. The class will also include a method to calculate the area and another to calculate the perimeter of the triangle. Attributes are of type public.
Write here the class diagram and class code in Java
Step by step
Solved in 3 steps with 1 images
- Library Information System Design and Testing Library Item Class Design and TestingDesign a class that holds the Library Item Information, with item name, author, publisher. Write appropriate accessor and mutator methods. Also, write a tester program(Console and GUI Program) that creates three instances/objects of the Library Items class. Extending Library Item Class Library and Book Classes: Extend the Library Item class in (1) with a Book class with data attributes for a book’s title, author, publisher and an additional attributes as number of pages, and a Boolean data attribute indicating whether there is both hard copy as well as eBook version of the book. Demonstrate Book Class in a Tester Program (Console and GUI Program) with an object of Book class.Practice with writing a program that contains three classes: Ship CruiseShip CargoShip Classes Design a Ship class with the following members: A field for the name of the ship (a string) A field for the year that the ship was built (a string) A constructor that accepts two arguments for the two fields, and appropriate accessors and mutators A toString method that returns a string with the ship’s name and the year it was built Design a CruiseShip class that extends the Ship class. The CruiseShip class should have the following members: A field for the maximum number of passengers (an int) A constructor that accepts three arguments for the three fields and appropriate accessors and mutators A toString method that overrides the toString method in the base class. The CruiseShip class’s toString method should return a string with only the ship’s name and the maximum number of passengers. Design a CargoShip class that extends the Ship class. The CargoShip class should have the…1. Part 1: A point in the x-y plane is represented by its x-coordinate and y-coordinate. Design the class Point that can store and process a point in the x-y plane. Your class should contains the following methods. Default constructor without parameters that initializes the private data member to the suitable values Constructor with parameters sets the values of the instance variables to the values of the parameter. Accessor methods that return the values of the x-axis and y-axis. setPoint method which set the values of x-axis and y-axis makeCopy method that make a copy of a received object of type Point. getCopy method that returns a copy of the current object toString method that returns the object string isEqual that returns true if the current object is equal to the received object of type point distance, which receives two objects of type Point and returns the distance
- in C# languageDesign a Book class that holds the title, author’s name, and price of the book. Books’s constructor shouldinitialize all of these data members except the price which is set to 500/-. Create a display method thatdisplays all fields.All Books are priced at 500/- unless they are PopularBooks. The PopularBooks subclass replaces theBookprice and sets each Book’s price to 50,000/- through PopularBooks construcor. Override the displaymethod to display all fields.Write a Main () method that declares an array of five Book objects. Ask the user to enter the title andauthor for each of the 5 Books. Consider the Book to be a PopularBook if the author is one of the following:Khaled Hosseini, Oscar Wilde, or Rembrandt. Display the five Books’ details.Design a Ship class that the following members: A field for the name of the ship (a string). A field for the year that the ship was built (a string). A constructor and appropriate accessors and mutators. A toString method that displays the ship’s name and the year it was built. Design a CruiseShip class that extends the Ship class. The CruiseShip class should have the following members: A field for the maximum number of passengers (an int). A constructor and appropriate accessors and mutators. A toString method that overrides the toString method in the base class. The CruiseShip class’s toString method should display only the ship’s name and the maximum number of passengers. Design a CargoShip class that extends the Ship class. The CargoShip class should have the following members: A field for the cargo capacity in tonnage (an int). A constructor and appropriate accessors and mutators. A toString method that overrides the toString method in the base class. The…INVENTORY CLASS You need to create an Inventory class containing the private data fields, as well as the methods for the Inventory class (object). Be sure your Inventory class defines the private data fields, at least one constructor, accessor and mutator methods, method overloading (to handle the data coming into the Inventory class as either a String and/or int/float), as well as all of the methods (methods to calculate) to manipulate the Inventory class (object). The data fields in the Inventory class include the inventory product number (int), inventory product description (String), inventory product price (float), inventory quantity on hand (int), inventory quantity on order (int), and inventory quantity sold (int). The Inventory class (java file) should also contain all of the static data fields, as well as static methods to handle the logic in counting all of the objects processed (counter), as well as totals (accumulators) for the total product inventory and the total product…
- Defining Classes Write and document the definition for the Product class. Each Product object has three instance variables: description, productNumber and price. The class has one constructor that takes three parameters in the order productNumber, description and price. The class has one accessor method named getCost(int qty) which returns the price for qty items of the Product. The class has two mutator methods—setPrice() and setDescription()—that modify the corresponding instance variables. The class has a toString() method that returns the Product as a String in the form: 34567: Small Toaster, $ 17.95. Note: use concatenation to construct the returned string. Do not use the String.format() method to format the returned value.True or FalseIt is a common practice to make all a class’s fields private and to provide access to those fields through methods.Object Oriented Programming in JAVA You are part of a team writing classes for the different game objects in a video game. You need to write classes for the two human objects warrior and politician. A warrior has the attributes name (of type String) and speed (of type int). Speed is a measure of how fast the warrior can run and fight. A politician has the attributes name (of type String) and diplomacy (of type int). Diplomacy is the ability to outwit an adversary without using force. From this description identify a superclass as well as two subclasses. Each of these three classes need to have a default constructor, a constructor with parameters for all the instance variables in that class (as well as any instance variables inherited from a superclass) accessor (get) and mutator (set) methods for all instance variables and a toString method. The toString method needs to return a string representation of the object. Also write a main method for each class in which that class is…
- Temp Class - Create Temp class whos job is to hold a temp in degrees F and gives methods to get the temp in F, Celsius, and Kelvin. The class should follow the instance variable (field): ftemp (double type that holds F temp)Follow these methods with the class.. Constructor --Will accept Fahrenheit temperature as a double to store it in the ftemp field. setFahrenheit - The setFahrenheit method accepts a Ftemperature as a doubleto stores it in the ftemp field. getFahrenheit - Returns the value of the ftemp field, as a Fahrenheit temperature (no conversion required). getCelsius - Returns the value of the ftemp field converted to Celsius. [C e l s i u s = ( 5.0 / 9.0 ) × ( F a h r e n h e i t − 32 )] getKelvin - Returns the value of the ftemp field converted to Kelvin. [K e l v i n = ( ( 5.0 / 9.0 ) × ( F a h r e n h e i t − 32 ) ) + 273] Exemplify the temp class by writing a (test) program that is separate and promotes users for an F Fahrenheit temp. The program must create an…Design a Ship class that has the following members:• A field for the name of the ship (a string).• A field for the year that the ship was built (a string).• A constructor and appropriate accessors and mutators.• A toString method that displays the ship's name and the year it was built.Disign a CruiseShip class that extends the Ship class. The CruiseShip class should have thefollowing members:• A field for the maximum number of passengers (an int).• A constructor and appropriate accessors and mutators.• A toString method that overrides the toString method in the base class. The CruiseShipclass's toString method should display only the ship's name and the maximum number ofpassengers.Design a CargoShip class that extends the Ship class. The CargoShip class should have thefollowing members:• A field for the cargo capacity in tonnage (an int).• A constructor and appropriate accessors and mutators.• A toString method that overrides the toString method in the base class. The CargoShipclass's…True or False An interface can be used to define a set of methods that a class must implement.