CSI 124 Programming using the detail informatio given below please create the designe of those table shows using wpf.Thank you!!
I Galaxy Cow Lattes 4 Buttons - 2 that open up our 2 other windows, 2 that perform our transactions, Buy Product and UsePoints. 2 List Boxes - One to display our collection of products, one to display the previous transactions of our currently selected member. (This one changes, and you switch between members) A combo box - This is used to select a single member at a time. 2 Labels - One that just identifies the product List box, and then one underneath our previous transactions list box. This will show how many points the user currently has. Optional: I have a rich text box on the left with some fun text. In the real world, retailers are constantly reminded to "upsell" or "make sure to ask the user to use the app". This would replicate that. Put whatever you want, or nothing at all. You are encouraged to change the design to whatever you want ( build the app to work, then move the pieces around as a suggestion ). Functional and well-designed are two different things. This example is functional, but not well-designed. Tip: When updating the user point amount, also update the combo box information, so you see the points reflected in the combo box. Example: cbMember.items.Refresh() Breakfast - Hash Browns $3.00 Py Lunch-GrilledCheese-$5.50-Poil. Coffee-ltaliano-$1.50-Points100-Venti-DarkTea-Matcha-$2.50-Points200-Short-Green Breakfast - Hash Browns - $3.00 - Points 300 - Is Heated True - Has Dairy, False Lunch - Grilled Cheese - $5.50 - Points 600 - Is Heated: True - Is A Combo; True Tumbler - Emerald - 520.00 - Points 2500 - Color: Forest Green Mug - Seattle Mug - $15.00 - Points 1800 - Style Seattle Waterfront GiftCard-Gift Card - $500.00 - Points $00 - Amount: $500.00 Your Add New Product window will have more form elements. Top : 3 List Boxes and labels to take Product information. The name, price, and points related to a single product. Below are the buttons and fields needed to create individual instances of objects. I've used 4 separate canvases to organize the information, you can organize how you like. Box 1 - Drinks: We have a combo box that lets users choose from 1 of 5 sizes. I provide the code to populate the combo box and even cast the selected value into a size. THIS IS RELATED TO THE ENUM IN YOUR DRINK CLASS. Change the code as needed to make it work. Inside of your "Add Drink" button event Coffee.Size size =( Coffee.Size ) cbSize.Selectedindex; The method below should load on opening of AddNewProduct Window: If it works, your combo box should be filled with name and have display Short on load. Change the combo box name to match yours. Box 2 - Food: Box 2 uses 2 checkboxes, (again, you can add more, 1 repurposed a check box ). One box is for passing in a bool to see if the food is hot. The other is to pass in a bool depending on if a Breakfast has dairy in it, or a lunch is a combo. Box 2 uses 2 checkboxes, ( again, you can add more, I repurposed a check box ). One box is for passing in a bool to see if the food is hot. The other is to pass in a bool depending on if a Breakfast has dairy in it, or a lunch is a combo. To retrieve the bool value from a check box in wpf you need to How to get the "if checked" result from a check box Bool IsChecked = ckBoxName.IsChecked.Value; Make sure to add the. Value to the end, otherwise it'll yell at you. Box 3 - Merchandise: This has a textbox to pass in a string. Box 4 - Gift Card Clicking this should generate a gift card that is the same amount as the price entered above. Classes To Create: - Data Class ( This will be used so our 3 separate windows can access the same data collections. - Product ( Abstract) - Drink (Abstract: Base Product) - Coffee (Base Drink) - Tea (Base Drink) Food ( Abstract: Base Product) - Breakfast ( Base Food) - Lunch (Base Food) Merchandise ( Abstract: Base Product) - Tumblers ( Base Merchandise ) - Mugs ( Base Merchandise) GiftCard (Base Product) - Member (Abstract) - GoldMember ( Base Member) RegularMember (Base Member) Full Details about Classes at the end of the Document Data Class STATIC Fields - Observable Collection for Member - Oberserable Collection for Products - currentProduct = null - current Member = null STATIC Constructor - Initialize both observable collections here STATIC Property ( All sets done by methods) - Public MemberCollection \{get; } - Public ProductCollect \{get; \} - Public CurrentProduct \{get; \} - Public CurrentMember \{get; \} STATIC Methods - Public Void AddProductToCollection(Product) - Public Void AddMemberToCollection(Member) - Public Void UpdateCurrentProduct(Product) - Public Void UpdateCurrentMember(Member) Your data class is vital to your project. All listboxes or combo boxes that need to display products or members should be connected to the collections here. MAKE SURE TO USE selectionBox. ItemsSource = CollectionName to make your life easier. All Properties should be static, and only have getters. Adding anything to your fields should be done with methods. Product ( abstract ) - Name - Sku ( a random number between 1000000 and 10000000 ) - Price - Points - Number of Product ( static) Product (abstract ) - Name - Sku ( a random number between 1000000 and 10000000) - Price - Points - Number of Product ( static) Constructor Product ( Name, price, points) \{ Wire up code to fields Use a random object to assign a value to sku between 1000000 and 10000000 Number of Product ++ in here 3 Override Tostring - Display GetType(), Sku, Name, Price, and point amount. Drinks, ( abstract, child of Product ) Enumerable for size (Short, Tall, Grade, Venti, Trenta) Size drink size - Constructor also made to take Size Coffee (child of Drink) - Field - Type of Roast ( string ) - Constructor - Take type of roast - Override ToString Append Roast to base Tea (child of Drink) - Field Type of tea ( green, white, black, etc...) - Constructor - Take type of roast - Override Tostring Append tea to base Food ( abstract, child of Product) bool isHeated - Constructor to take Heated Food ( abstract, child of Product ) bool isHeated - Constructor to take Heated Breakfast ( child of Food) - Field - Bool hasDairy - Constructor - Take if it hasDairy - Override Tostring Append hasDairy to base Lunch - Field - Bool isCombo - Constructor - Take if it is a Combo - Override Tostring Append iscombo to base Merchandise, ( abstract, child of Product) Tumblers ( child of Merchandise ) Field - String Color - Constructor - Take the color - Override ToString Append Color to base Mugs ( child of Merchande ) - Field - String design - Constructor - Take the design Override Tostring Append design to base Gift Cards ( child of Product) - Field - Amount - Constructor to take amount - Override Tostring - Append amount to base ALL CLASSES SHOULD OVERRIDE THE TO STRING - Each class should add it's unique field to the end of the parents to string Class: Member ( abstract) - First Name - Last Name - Member number ( a random number between 1000000 and 10000000) - Point Amount - Member Since ( DateTime object) Constructor - Member (Firstname, lastname ) Member number randomly generate Point amount starts at 0 Member since should use DateTime.Now Method DeductPoints(Product) : Abstract AddPoints(Product) : Abstract Override ToString - GetType() - First Name Last Name - Points ( Display Points ) - Member Number - Regular Member (Child of Member) Override DeductPoints(Product) Deduct the products points from the member Override AddPoints(Product) : Abstract Add the products points for the member Gold Member (Child of Member) Override DeductPoints(Product) Method DeductPoints(Product) : Abstract AddPoints(Product) : Abstract Override Tostring - GetType() - First Name Last Name - Points ( Display Points ) - Member Number - Regular Member (Child of Member) Override DeductPoints(Product) Deduct the products points from the member Override AddPoints(Product) : Abstract Add the products points for the member Gold Member (Child of Member) Override DeductPoints(Product) Deduct HALF the products points - 50 from the member Override AddPoints(Product) : Abstract Add the products points +50 for the member