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

  What are the advantages of using voip

Conduct an Internet search to locate a case study that shows how VoIP was beneficial to the organization.

  Project lacking the minority project

Give three examples of why a project might lack the technical feasibility.

  Design a class diagram for the ticket-processing system

Design a class diagram for the ticket-processing system

  Designing a web page

In designing a web page, depending upon the information you are trying to convey, use of the tables may add the great deal of the organization on help clear any possible confusion on what you are trying to communicate.

  Knowledge management systems

Explain why the knowledge management systems could be so significant to the modern organization where organization could initiate such systems and for this initiative.

  Define current and emerging nonvolatile ram technologies

List and explain current and emerging nonvolatile RAM technologies. What advantages are potentially offered by the emerging technologies as compared to current flash RAM technology?

  Services commonly supported by a server

explain five services commonly supported by a server and address security mechanisms and devices that are used to support client/server functions.

  Use the int cast process to convert to an integer

give Output the corresponding letter grade along with the initial number entered in decimal format utilizing the printf method and format specifiers. Output the number in only 3 decimal places.

  What are the suitable foreign keys

What are the appropriate primary keys and given the selected primary keys, what are the appropriate foreign keys.

  Why should asks the user to enter a number from 1 to 50

Print the statement "Programming is fun" the number of times entered by the user using the for loop.

  Program to insert the name cervantes

"In the following exercises, suppose that the Simple combo box appears as shown and that the Sorted property is set to True. Give a statement or statements that will carry out the stated task."

  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..

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