sdf104
sdf104
class MonaresPhotoDemo
{
static void Main(string[] args)
{
Console.WriteLine("Enter the width of the photo in inches:");
double width = double.Parse(Console.ReadLine());
Console.WriteLine("Enter the type of photo (1 for regular, 2 for matted, 3 for framed):");
int type = int.Parse(Console.ReadLine());
if (type == 1)
{
Photo photo = new Photo(width, height);
Console.WriteLine(photo);
}
else if (type == 2)
{
Console.WriteLine("Enter the color of the mat:");
string color = Console.ReadLine();
class Photo
{
public double height { get; set; }
public double width { get; set; }
protected double price;
public FramedPhoto(double width, double height, string material, string style) : base(width,
height)
{
this.material = material;
this.style = style;
price += 25;
}
rectangle.Height = 7;
rectangle.Width = 14;
DisplayFigure(rectangle);
square.Height = 7;
square.Width = 14;
DisplayFigure(square);
triangle.Height = 7;
triangle.Width = 14;
DisplayFigure(triangle);
}
using System;
class MonaresSpecialCookie
{
static void Main(string[] args)
{
SpecialCookieOrder order1 = new SpecialCookieOrder();
Console.WriteLine("Enter Order Number:");
order1.OrderNumber = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter Recipient Name:");
order1.RecipientName = Console.ReadLine();
Console.WriteLine("Enter Cookie Type:");
order1.CookieType = Console.ReadLine();
Console.WriteLine("Enter Dozens Ordered:");
order1.DozensOrdered = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter Description:");
order1.SpecialReason = Console.ReadLine();
Console.WriteLine("");
// Calculate prices
order1.SetPrice();
Console.WriteLine("Order 1:");
Console.WriteLine("Order Number: " + order1.OrderNumber);
Console.WriteLine("Recipient Name: " + order1.RecipientName);
Console.WriteLine("Cookie Type: " + order1.CookieType);
Console.WriteLine("Dozens Ordered: " + order1.DozensOrdered);
Console.WriteLine("Description: " + order1.SpecialReason);
Console.WriteLine("Price: $" + order1.Price);
}
}
class CookieOrder
{
public int OrderNumber { get; set; }
public string RecipientName { get; set; }
public string CookieType { get; set; }
private int dozensOrdered;
protected double price;