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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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