72 517
Assignments Done
Successfully Done
In April 2019

Answer to Question #42767 in C# for priya

Question #42767
David needs to create a program to maintain the details of the stock of a shop. He needs to
ensure that item category is Women, Men, Girls, Boys, and Babies. He needs to accept item
category from the user. In addition, he needs to accept item name, number of units, and unit price.
Finally, he needs to display all the details
Expert's answer
using System;
using System.Linq;

enum ItemCategory {Women, Men, Girls, Boys,Babies }
class Category
public string name;
public int number_of_units;
public double unit_price;
publicCategory(ItemCategory x, string y, int z, double k) { name = y; number_of_units = z; unit_price= k; IC = x; }
public void ShowInfo()
{ Console.WriteLine("item category is : " + IC + ";\n item name : " + name + ";\n number of units : " +number_of_units + ";\n unit price : "+unit_price+"."); }
class Program
static void Main()
Categoryt = new Category(ItemCategory.Girls,"toys",5,2.5);


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions