Question: Complete in C# Question 1: Question 2: 1. Implementing an Extension Method Your job is to write an extension method called to Roman to convert

Complete in C#

Question 1:

Complete in C# Question 1: Question 2: 1. Implementing an Extension Method

Question 2:

Your job is to write an extension method called to Roman to

1. Implementing an Extension Method Your job is to write an extension method called to Roman to convert and int to its roman representation so that a client code such as below would work. static void Main(string[] args) { int i = 99; string s = i.toRoman(); Console.WriteLine (s); } Create an abstract class Product with following o Properties Price (Decimal), Code (string), Description (string) Create an interface ISellable with the following o Method sell that takes the count of the products to sell and returns the cost public decimal sell (int count); Create a concrete class Book that Inherits from class Product o and implements interface ISellable Has additional Property Author (string) o Add a constructor with parameters, and ToString method to display all of data of class Book Similarly, create anot concrete class Software that o Inherits from class Product o and implements interface Sellable o Has additional Property Version (string) o Add a constructor with parameters, and ToString method to display all of data of the class Software Finally, write a client code (main program) that will utilize the class and interface hierarchy you created. o Create two Book objects for the following books C# 8.0 in a Nutshell, with price $50.99 and with ISBN 978-1492051138 by Jack Smith C#: Advanced Features and Programming Techniques, with price $2.99 and with ISBN 100-1492051000 by Jill Smith Ask the user how many of each book the user wants to buy and then display a report of how much the total cost is. Create a Software object for the following Software Microsoft 365 Personal with price $69.99 and version 16.0.10827 Ask the user how many of the Microsoft 365 the user wants to buy and then display a report of how much the total cost is. 1. Implementing an Extension Method Your job is to write an extension method called to Roman to convert and int to its roman representation so that a client code such as below would work. static void Main(string[] args) { int i = 99; string s = i.toRoman(); Console.WriteLine (s); } Create an abstract class Product with following o Properties Price (Decimal), Code (string), Description (string) Create an interface ISellable with the following o Method sell that takes the count of the products to sell and returns the cost public decimal sell (int count); Create a concrete class Book that Inherits from class Product o and implements interface ISellable Has additional Property Author (string) o Add a constructor with parameters, and ToString method to display all of data of class Book Similarly, create anot concrete class Software that o Inherits from class Product o and implements interface Sellable o Has additional Property Version (string) o Add a constructor with parameters, and ToString method to display all of data of the class Software Finally, write a client code (main program) that will utilize the class and interface hierarchy you created. o Create two Book objects for the following books C# 8.0 in a Nutshell, with price $50.99 and with ISBN 978-1492051138 by Jack Smith C#: Advanced Features and Programming Techniques, with price $2.99 and with ISBN 100-1492051000 by Jill Smith Ask the user how many of each book the user wants to buy and then display a report of how much the total cost is. Create a Software object for the following Software Microsoft 365 Personal with price $69.99 and version 16.0.10827 Ask the user how many of the Microsoft 365 the user wants to buy and then display a report of how much the total cost is

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!