Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In the application, we will be asking the user to supply the width and height of an image to resize (the user is not supplying

  1. In the application, we will be asking the user to supply the width and height of an image to resize (the user is not supplying an actual image file). The user will also supply the maximum edge of the image. Create a class named ImageSize. It should have properties for width and height. You will create a method for ResizeImage, returning an ImageSize object of the resized width and height. The dimensions must retain the original aspect ratio of the image. If both width and height are lower than the maximum edge, return the original values. If the width is greater than the maximum edge and greater than the height, set the width to the maximum, and calculate the new height based on the aspect ratio. If the height is greater than the maximum edge and greater than the width, set the height to the maximum, and calculate the new width based on the aspect ratio. Example output: Enter the width of the image: 200 Enter the height of the image: 100 Enter the maximum edge of the image: 50 The resized image has a width of 50 and a height of 25
  2. Add your name and the date as comments at the top of the code file.
  3. In the last line of the program's main method, add Console.ReadKey(); to stop the programming from ending automatically

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Records And Database Management

Authors: Jeffrey R Stewart Ed D, Judith S Greene, Judith A Hickey

4th Edition

0070614741, 9780070614741

More Books

Students also viewed these Databases questions

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago