IProducts In C# - 95893

Solution Posted by


Rating : No Rating
Solution Detail
Price: $35.00
  • From: Computer Science,
  • Posted on: Wed 16 Mar, 2016
  • Request id: None
  • Purchased: 0 time(s)
  • Average Rating: No rating
Request Description
1) An interface called IProduct to allow common (polymorphic) processing of all classes that implement this interface. 2) Implement at least two types of product objects (two classes) that implement the IProduct interface. For example, one may be ProductStock class which contains additional information such as number of items in stock. Another may be ProductComparison, which contains the product’s retail price and the best price from another source (buyer’s website for example). 3) Test a class called ProductDisplay which has the following four methods, each of which takes one or two parameter object of a class implementing the IProduct interface: • Two separate methods for printing each of the product type and product description. • A method for returning both values of a given object in a formatted string. • Boolean method with two parameters that checks if a two separate objects 4) An abstract class called Product that has the same abstract methods as the IProduct interface but contains attributes for the product type and description. Also implement a constructor to initialize both of these attributes. Test the abstract class by implementing and testing a derived class called StockItem that contains an additional attribute string called supplier.
Solution Description