Inventory management System

Source: Internet
Author: User

Our title is inventory, it is absolutely inseparable from goods. So since it is an item, it has its own attributes.

Goods should have their own attributes. (item name, storage location, unit price, customer satisfaction)

The following steps for everyone to be abbreviated first:

First:

Initialize the goods information.

goods[] goods= new goods[3];            Write an initial inventory item information public void Initial () {//Initialize first item goods[0] = new Goods (); Goods[0].                Name = "Peacock feather"; Item name Goods[0].      Weizhi = "First Warehouse first row"; Item Location Goods[0].                   Manyidu = 100; Item Satisfaction Goods[0].                   Danjia = 18.5;            Item Price//initialization of the second item goods[1] = new Goods (); GOODS[1].                Name = "Leaning on the Day Sword"; Item name Goods[1].      Weizhi = "First warehouse second row"; Item Location GOODS[1].                   Manyidu = 80; Item Satisfaction Goods[1].                   Danjia = 12.5;            Item Price//initialization of the third item goods[2] = new Goods (); GOODS[2].                Name = "Dragon Slayer Knife"; Item name Goods[2].      Weizhi = "First warehouse third row"; Item Location GOODS[2].                   Manyidu = 60; Item Satisfaction Goods[2].                   Danjia = 6.5; Item Price} 

  

Second:

Displays the Inventory Management menu.

        public void System ()//system Systems {BOOL flag = true;                while (flag)//Loop {Console.WriteLine ("");                Console.WriteLine ("======================= Welcome to use Inventory management system ========================");                Console.WriteLine ("1: Obtain the item name according to the product Name 2: Obtain the highest customer Satisfaction 3: Exit");                Console.WriteLine ("===================================================================");                Console.WriteLine ("Please select:");                String choice = Console.ReadLine ();                        Switch (choice) {case "1": Position ();                    Break                        Case "2": getpleased ();                    Break                        Case ' 3 ': Out ();                    Break                        Default:Console.WriteLine ("Menu selection error, please re-enter Options"); COnsole.                        WriteLine ("");             Break }                       }        }

  

Third:

Output all existing item names in stock.

public void Show ()         {            Console.WriteLine ("List of inventory items");            Console.WriteLine ("========================================");            Console.WriteLine ("Item Name:  {0}", Goods[0]. name);//Display Peacock feather            Console.WriteLine ("Item Name:  {0}", Goods[1]. name);//Display            the Console.WriteLine Sword ("Item Name:  {0}", goods[2]. Name);//Display Dragon Sword            Console.WriteLine ("========================================");            Console.WriteLine ("\ n");        }

  

Forth:

Output the highest satisfaction goods and the lowest satisfaction goods, so that customers understand the specific situation.

  public void getpleased ()         {            Goods good = new Goods ();            Good. Manyidu = 0;            Get the highest satisfaction item assigned to GOODS4            foreach (Goods item in Goods)            {                if (item. Manyidu > Good. Manyidu)                {                    good = Item;                }            }                       Console.WriteLine ("Warm Tip:");            Console.WriteLine ("Highest Customer satisfaction: {0} items placed at: {1} satisfaction: {2} Unit Price: {3}", good. Name, good. Weizhi, good. Manyidu, good. Danjia);         }

  

Fifth:

According to the customer's request to get the goods they want.

        public void Position ()         {            Console.WriteLine ("Please enter the product name:");            String goods5 = Console.ReadLine ();     GOODS5 cargo            BOOL flag = FALSE;            foreach (Goods item in Goods)            {                if (item. Name.equals (GOODS5))                {                    flag = true;                    Console.WriteLine ("Product Name:  {0}", item.) Name);                    Console.WriteLine ("Product location:  {0}", item.) Weizhi);                }             }            if (Flag==false)            {                Console.WriteLine ("Soorry does not have the item, please enter it from the new selection");}         }

  

Since there is backstage, then there is the front desk.

The main task of the front desk is to provide services to customers:

(1) If the customer output the desired product, the backstage can quickly find the location of the product

(2) If the customer outputs the highest satisfaction goods, the backstage can quickly find the most satisfactory products for the customers.

(3) Every program has a beginning, which of course will have the end. That's the exit we're familiar with.

public void Out ()        {            Console.WriteLine ("You have successfully exited, welcome to!!! Again next time");            Console.ReadLine ();                   

  

Inventory management System

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.