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

Reference no: EM1337627

Questions Cloud

Sec has influence over the audit : Discuss how the SEC has influence (if any) over the audit of Smackey Dog Foods, Inc.
Elucidate what is the impact of a trade surplus : Elucidate what is the impact of a trade surplus. What is the impact of a trade deficit? How do trade deficits and trade surpluses affect the firm you work for.
Explain marketing- 4 p''s on and offline : Explain Marketing- 4 P's On and Offline and explain In what ways do the 4 P's differ in an online environment than they would for a brick-n-mortar retail business model
The pros and cons of using the 9 step problem : Discuss the pros and cons of using the 9-step problem.
How to modify the perimetercalc class : how to 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.
Asume you are analyzing the market for minivans : Asume you are analyzing the market for minivans. What will be the impact on the equilibrium price and equilibrium quantity of each of the following events on the minivan market. Justify your answer using the supply and demand model.
Determining repurchase stock : Construct Green's market-value balance sheet before the announcement of the debt issue. What is the price per share of the firm's equity? Construct Green's market-value balance sheet immediately after the announcement of the debt issue.
Find out a description of a software development process : Find out a description of a software development process,preferably with a description on the web.
Explain viability of advertising on social media platforms : Explain Viability of advertising on social media platforms and What are your thoughts on the viability of advertising on various social media platforms for the company you've chosen to analyze for your course project

Reviews

Write a Review

Computer Engineering Questions & Answers

  The decision-making logic of a human expert is known as

the decision-making logic of a human expert is known as.

  Find the waterfall project management methodologies

find the waterfall project management methodologies. If you are asked by your boss to start a specific new project, what are the possible questions you'll ask him/her or what information would you collect from him/her before you leave his/her offic..

  Determining stationary points of function

Determine the stationary points of function F(x)=2x_1^3-3x_1^2-6x_1 x_2 (x_1-x_2-1). Which points among these are local minima, which are local maxima, and which are neither?

  Monitoring of patient vital signs using mobile computing

Compare and contrast the monitoring of patient vital signs utilizing the mobile computing technology to in-patient visits to the doctor’s office or hospital.

  Explaining troubleshooting

AV software has removed the malware from highly infected system. After first reboot, an error message is showed which consists of a reference to the strange DLL file which is missing. Explain two options you must use in order to start troubleshoot..

  Design a pseudocode algorithm

design a pseudocode algorithm you would write for a simple task like making a turkey sandwich, as well as three simple control structures that could be used to create this algorithm. What do you think is the most difficult part of creating the alg..

  Make a use of normalizing and data integrity methodologies

Consider a typical job order that might include the following information. make a single table to hold all the information required to store a job order including this information. Next, apply normalization to reduce this table to third normal for..

  What usually causes "illegal start of expression" errors

Does anyone have any ideas what usually causes "illegal start of expression" errors? Is there something the compiler is looking for in general? I am trying to debug a program and I keep getting this error. This error is before one of my public voi..

  Define a point made by a classmate

What rights to privacy do people have while using the Internet at home? Are their privacy rights limited? Do those same rights and limits exist at work? Explain your answer.

  An instance of a situation where a trigger would appropriate

What are triggers used for, and why are they important in database systems? give an example of a situation where a trigger would be appropriate. What would the implementation of this trigger look like.

  Define the use and importance of a guided navigation system

explain the use and importance of a guided navigation system and shopping cart for a website designed for e-commerce and business purpose. Also explain how the site should take payments using a payment gateway.

  Weighted directed graph

Provided an example of the weighted directed graph G = (V, E) with weight function ω: E→R and source vertex s such that the G satisfies following property: For each edge (u,v)∈E,

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd