Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a C# program for Potsie\'s Pottery named FlexibleOrder that accepts a use

ID: 3664184 • Letter: C

Question

Create a C# program for Potsie's Pottery named FlexibleOrder that accepts a user's choice from the options in the accompanying table. Allow the user to enter either an integer item number or a string description. Pass the user's entry to one of two overloaded GetDetails() methods and then display the returned string. The method version that accepts an integer looks up the description and price and returns a string with all the order details. The version that accepts a string description looks up the item number and price and returns a string with all the order details. The methods return an appropriate message if the item is not found.

Explanation / Answer

using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace FlexibleOrder { class Program { static void Main(string[] args) { Inventory inventory = new Inventory(); Order order = new Order(); } } class Item { public string Description { get; set; } public int Price { get; set; } public int ItemNum { get; set; } } class Inventory { List items = new List(); } class Order { List items = new List(); public void Add(Item items) { } public List GetDetails() { return items; } } }