### How to modify the perimetercalc class

Assignment Help Computer Engineering
##### Reference no: EM1337627

modify the PerimeterCalc class so that a caller who has a square plot will be able to provide only one argument value for length and width (rather than two that are just the same) in the method invokation.

I'm pretty sure I need to add another constructor but then what about the compute part?

Class PerimeterCalc
private PlotNumber
private Length
private Width
private Perimeter
public PerimeterCalc
PlotNumber = "None"
Length = 0.0
Width = 0.0
Perimeter = 0.0
End
public PerimeterCalc (AnyPlot, AnyLength, AnyWidth)
PlotNumber = AnyPlot
Length = AnyLength
Width = AnyWidth
Perimeter = 0.0
End
public GetMeasurements
Input PlotNumber, Length, Width
End
public ComputePerimeter
Perimeter = (2.0 * Length) + (2.0 * Width)
End
public ShowResults
Display PlotNumber, Perimeter
End
End Class

#### Suppose that all items are priced per-pound

Let us say you are a farmer and you participate in Farmers Market every Sunday. You bring 5 favorite vegetables or fruits for sale. You are going to use a program for checki

#### How internal auditing contributes to effectiveness of act

What is the responsibility by of audit committee of Sarbanes-Oxley of 2002? Explain how internal auditing contributes to the effectiveness of the purpose and goals of the Sarb

#### How to make the changes permanent

Write down and execute two INSERT statements to insert rows into the ZIPCODE table for the following two cities of your choice. After your INSERT statements are successful,

#### How you format outputs that involve floating point

Discuss how you format outputs that involve floating point. Provide examples - Many programs require the use of an input mechanism to get data into the program and an output

#### How many hour work each week to pay for gas to fuel the car

As a part time student and a part time worker, you earn \$4.50 an hour. Your parents would buy you a used car, but you must pay for the gas. gas costs \$1.10/gallon and you us

#### Write out a program that acts as a simplified eliza

write out a program that acts as a simplified Eliza using prolog but I can't even figure out where to start. Here are the steps I have to follow. 1. accept a sentence that i

#### How backtracking search can be used to solve this problem

With the constraint graph preprocessed by AC-3 in part (a), show how backtracking search can be used to solve this problem. To do this, you must draw the search tree generat

#### Write down three separate simple exception handlers

Write down three separate simple exception handlers, one for dividing by zero, another for attempting to open a nonexistent file, and the last for an array out-of-bounds che