How to solve it?

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

How to solve it?

Post by answerhappygod »

How to solve it?
How To Solve It 1
How To Solve It 1 (70.29 KiB) Viewed 18 times
[10 Marks] 2. Write a C# application that asks the user to input the required data to implement the two methods below: (Use Method Overloading to write the methods) a. Method Perimeter that takes as input, a double value (length), calculates the perimeter of a square, and displays it. [Perimeter = 4 * length] b. Method Perimeter that takes as input two double values (length) and (width), calculates the perimeter of a rectangle, and displays it. [Perimeter = 2* (length + width)] Sample I/O Enter the length of the square: 3.2 Enter the length of the rectangle: 5.1 Enter the width of the rectangle: 2.3 The perimeter of the square is 12.8 The perimeter of the rectangle is 14.8 [15 Marks]
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply