Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Create a UML for a class called triangle. It will have an argument constructor that sets the sides to be side 1 as 10, side 2 as 10 and side 3 as 10. It sets the height to 15.Note that side 3 is the base. It will have a method called setDimensions ( int s1, int s2, int s3, int h) as a void that will set the sides to any values passed and any height passed. It will have a method get Area() that will return the area of the triangle as a return type. it will have a method isEquilateral () as void that will display: Your triangle is an equilateral if all 3 sides are the same value, else it will say: Your triangle is not an equilateral. After creating the UML, create the java code.
Test the code by creating a tester file called TestTriangle, it will create one object t1 that will be the default triangle values. It will create object t2 that will use the setDimensions() method to set the values to 10,15, 20 for sides and 25 for height of triangle. Call the getArea () on t1 and display via main method: The area of the first triangle is 50. Then also call the isEquilateral on t1. Then call the getArea () for t2 and display via the main method: the area of the second triangle is _____. After that call the isEquilateral() for t2.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91230793
  • Price:- $30

Priced at Now at $30, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Suppose that 75 of all trucks undergoing a brake inspection

Suppose that 75% of all trucks undergoing a brake inspection at a certain inspection facility pass the inspection. Consider groups of 15 trucks and let X be the number of trucks in a group that have passed the inspection ...

Suppose i am transferring a 1024 byte file from my laptop

Suppose I am transferring a 1024 byte file from my laptop to a server on my very slow circuit-switched, start-topology local area network (the data rate on the network is only 16 bytes per second. Ignoring any connection ...

Video and disruption report assignmentoverviewfor this

Video and Disruption Report Assignment Overview For this assessment task, you will create a two-minute video and written proposal about the impact of a particular technology on an industry or field. The purpose of this a ...

Question take screenshots of functions running in clisp

Question : Take screenshots of functions running in cLISP. Provide a description for each screenshot. 1. Create the function DecTree that will implement decision tree. Your function should accept input of decimal string ...

Annual demand and supply for the mylan company is given

Annual demand and supply for the Mylan company is given by: QD = 5,000 + 0.5 I + 0.2 A - 100P, and QS = -5000 + 100P where Q is the quantity per year, P is price, I is income per household, and A is advertising expenditu ...

Suppose there are two links between a source and a

Suppose there are two links between a source and a destination. The first link has transmission rate 200 Mbps and the second link has transmission rate 15 Mbps. Assuming, that the only traffic in the network comes from t ...

Systems and networksconsider sending a large file from a

(Systems and Networks) Consider sending a large file from a host to another host using a reliable connection such as TCP. Suppose the reliable connection uses additive-increase, multiplicative-decrease (AIMD) without slo ...

Is it ethical for facebook to mine its users posts for

Is it ethical for Facebook to mine its users' posts for signals that those users are about to go through a break up? Is it ethical for the company to then help its clients target their ads based on this research? Is what ...

Regional blocs like the eu are straining the british have

Regional blocs like the EU are straining. The British have voted to Brexit! What has caused the tension and what does the future hold - for Brexit and beyond?

Start from scratch on each of the parts write a main

Start from scratch on each of the parts. Write a main function that declares an array of 100 doubles. In a for loop, assign each of the doubles a random number between 0.50 and 50.00. Here's how. array[i] = (double) (ran ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As