There is a lot of inventory here you know! (The interested person enters!)

Source: Internet
Author: User

               Kindergarten class, Silent

the mass of inventory first look

First into my inventory management system you will find that there is no big difference with them, but also there is a classic part of my text and crap not much classic code is the king down the road.

The first thing to do is to initialize a lot of my goods.

  Public voidInitial () {//Nth GoodsGoods good1 =NewGoods (); Good1. GoodsName1="Everything has"; Good1. GoodsPlace1="Nth warehouse n row n column up or down"; Good1. GoodsPleased1=9999999999; Good1. GoodsPrice1=1.111111111; goods[0] =good1; 

How about that?  More inventory! And everything has a price super affordable welcome to buy.

 Public voidShowMenu () {intPlace ;  Do{Console.WriteLine ("\ n-------------------------------Welcome to use the Silent Unlimited Super Inventory management system-------------------------------"); Console.WriteLine ("1: According to the name of the goods to obtain the product location 2: To obtain the highest customer satisfaction of the goods 3. Exit"); Console.WriteLine ("---------------------------------------------------------------------------------------------"); Console.WriteLine ("Please select:"); Place=int.               Parse (Console.ReadLine ()); Switch(place) { Case 1:                       //get the product location according to the product name                       if(Getgoodsplace () = =false) {Console.WriteLine ("the name of the item you entered is incorrect! "); }                        Break;  Case 2:                       //get the highest customer satisfaction itemsgetmaxpleased ();  Break;  Case 3: Console.WriteLine ("exit the Inventory management system! "); return; default: Console.WriteLine ("Menu selection Error, please re-enter the option! ");  Break; }           }  while(true); }  

After a dazzling purchase finally you have a rewarding. Then please choose one or more items that are very satisfying!

//then please input the most satisfactory item information I will be more attentive to serve you Public voidgetmaxpleased () {Goods good=NewGoods (); Good=getpleased (); Console.WriteLine ("Warm tips:"); stringGoodsName1 =string. Format ("Highest Customer satisfaction: {0} placed at: {1} satisfaction: {2} Price: {3}", good. GoodsName1, good. GoodsPlace1, good. GoodsPleased1, good.            GOODSPRICE1);        Console.WriteLine (GOODSNAME1); The most satisfied items are: PublicGoods getpleased () {Goods Goodss=NewGoods (); Goodss. GoodsPleased1=0; foreach(Goods Iteminchgoods) {        if(item!=NULL){                if(item. GoodsPleased1 >Goodss. GoodsPleased1) {Goodss. GoodsPleased1=item.                    GoodsPleased1; Goodss. GoodsName1=item.                    GoodsName1; Goodss. GoodsPlace1=item.                    GoodsPlace1; Goodss. GoodsPrice1=item.                  GoodsPrice1; }            }      }

Thank you for coming. We will continue to improve our system to allow you to experience more comfortable service Welcome to visit Sir Next time!

The above code is for reference only and there are a lot of shortcomings also hope that old friends more guidance to the maze

The little friends will be grateful to write a more perfect code revolution has not yet been successful, the friends are still trying!


To be continued in ... ···

There is a lot of inventory here you know! (The interested person enters!)

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.