Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone help me with my code? It throws an error on Line 39 in the Side extends class. Any help is appreciated!! public class

Can someone help me with my code? It throws an error on Line 39 in the Side extends class. Any help is appreciated!!

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

public class Main { public static void main(String[] args) { Vertex va = new Vertex(-0.5,0); Vertex vb = new Vertex(0.5, 0); Vertex vc = new Vertex(0,0.866); Side sideA = new Side (va, vb); Side sideB = new Side (vb, vc); Side sidec = new Side (vc, va); Side[] sides = {siden, sideB, sideC}; Triangle tri = new Triangle(sides); System.out.println("tri: " + tri.toString()); 16 } 1 abstract class Polygon { protected int numSides = 0; protected Side[] sides; public int getNumSides() { return numSides; public Side[] getSides() { return sides; public void setNumSides (int numSides) { this.numSides = numSides; public void setSides (Side[] sides) { this.sides = sides; public Polygon(int numSides, Side[] sides) { this.numSides = numSides; this.sides = sides; public double computePerimeter() { int a = this.getNumSides(); double b = 0.0; for(int i = 0; i

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Discuss the Rights issue procedure in detail.

Answered: 1 week ago

Question

Discuss the Rights issue procedure in detail.

Answered: 1 week ago

Question

Explain the procedure for valuation of shares.

Answered: 1 week ago

Question

Which months of this year 5 Mondays ?

Answered: 1 week ago

Question

Define Leap year?

Answered: 1 week ago

Question

Discuss communication challenges in a global environment.

Answered: 1 week ago