C # Practical Answers
C # Practical Answers
------------------------------------------------------------------
//----------------------------------------------------Answer # 1
---------------------------------------------------------//
//using System;
//public class Product
//{
//class Program
//{
// static void Main(string[] args)
// {
// Product product = new Product("computer", 999.99m, 15);
// Console.WriteLine($"Product: {product.Name}");
// Console.WriteLine($"Price: {product.Price}");
// Console.WriteLine($"Stock: {product.Stock}");
// Console.WriteLine($"Is in stock: {product.IsInStock()}");
// }
//}
//----------------------------------------------------Scenario 1
------------------------------------------------------------------
//----------------------------------------------------Answer # 2
---------------------------------------------------------//
//using System;
//class Program
//{
// static void Main(string[] args)
// {
// Customer customer = new Customer("Abrar Patel", "[email protected]");
// Console.WriteLine("Customer Name: " + customer.Name);
// Console.WriteLine("Customer Email: " + customer.Email);
// }
//}
//----------------------------------------------------Scenario 1
------------------------------------------------------------------
//--------------------------------------------------------------Answer #
3---------------------------------------------------------
//using System;
//using System.Collections.Generic;
//class Program
//{
// static void Main(string[] args)
// {
// Customer customer = new Customer("Abrar patel", "[email protected]");
// Product product1 = new Product("Laptop", 1000m, 10);
// Product product2 = new Product("Phone", 500m, 20);
//----------------------------------------------------Scenario 1
------------------------------------------------------------------
//--------------------------------------------------------------Answer #
4---------------------------------------------------------
//using System;
// order.DisplayOrderDetails();
// }
//}
//----------------------------------------------------Scenario 3
------------------------------------------------------------------
//-------------------------------------------------------Answer # 1
------------------------------------------------------------------------//
// Console.WriteLine("Car Details:");
// Console.WriteLine($"Make: {car.Make}");
// Console.WriteLine($"Model: {car.Model}");
// Console.WriteLine($"Rental Price Per Day: ${car.RentalPricePerDay}");
// Console.WriteLine($"Number of Doors: {car.NumberOfDoors}");
// Console.WriteLine($"Is Automatic: {car.IsAutomatic}");
// Console.WriteLine("\nBike Details:");
// Console.WriteLine($"Make: {bike.Make}");
// Console.WriteLine($"Model: {bike.Model}");
// Console.WriteLine($"Rental Price Per Day: ${bike.RentalPricePerDay}");
// Console.WriteLine($"Has Carrier: {bike.HasCarrier}");
// }
//}
//----------------------------------------------------Scenario 3
------------------------------------------------------------------
//-------------------------------------------------------Answer # 2
------------------------------------------------------------------------//
// customer.DisplayCustomerInfo();
// }
//}
//----------------------------------------------------Scenario 3
------------------------------------------------------------------
//-------------------------------------------------------Answer # 3
------------------------------------------------------------------------//
//using System;
//----------------------------------------------------Scenario 3
------------------------------------------------------------------
//-------------------------------------------------------Answer #
4------------------------------------------------------------------------//
//using System;