Answered step by step
Verified Expert Solution
Question
1 Approved Answer
**Must be written in C# Programming Exercise I Create an application class named PhotoDemo that demonstrates the methods of two related classes for a company
**Must be written in C#
Programming Exercise I Create an application class named PhotoDemo that demonstrates the methods of two related classes for a company that develops photographs. They offer two standard size photos (8x10 and 10x12) and also offer custom sizes and framing First create a class named Photo that includes the following fields . width * price . STDHEIGHTI height . STDWIDTH STDPRICE STDWIDTH2 STDHEIGHT2 STDPRICE2 e CUSTOMPRICE Set protected price field to $3.99 for an 8-inch by 10-inch photo. S5.99 for a 10-inch by 12-inch photo, and S9.99 for any other custom size (because custom cutting is required) The price field requires a get accessor but no set accessor. Photo class can also contain the following method that set the price depending upon, whether it's a standard, custom or framed photo protected void setPrice (double premium) Also include a ToString() method that returns a string constructed from the return value of the object's GetType() method and the values of the fields Hint: Before creating sub class, test Photo class by creating its objects(instances) in Main method, like Photo stdPhoto new Photo(); Photo customPhoto new Photo(); Then set values for width and height of the objects and test toString() methods Now Derive the subclass-FramedPhoto. The FramedPhoto class includes two string fields that hold 1. 2. 3. Frame's material (such as silver) Style (such as modern).and the Premium price for a FramedPhoto increases by S25 over its base costStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started