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!)