Home > database >  Store inventory program design
Store inventory program design

Time:10-07

Just learned strings, and basic operators, learning how to made a form, the code is as follows,
Package du;

Public class SXT {
Public static void main (String [] args) {
//apple laptop
String macBrand="MacBookAir";
Double macSize=13.3;
Double macPrice=6988.88 d;
String macConfig="i5 processor, 4 gb of memory 128 gb SSD";
Int macCound=5;
//Thinpad lenovo notebook computer
String thinkpadBrand="ThinkpadT450";
Double thinSize=14.0;
Double thinPrice=5999.99;
String thinConfig="i5 processor, 4 gb of memory 5 oog SSD";
Int thinCound=10;
//the ASUS notebook computer
String ASUSBrand="embed - FL5800";
Double ASUSPric=15.6;
Double ASUSSize=4999.5;
String ASUSConfig="i7 processor 4 g memory 128 gb SSD";
Int ASUSCound=18;

System. Out. Println (" -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- mall inventory ", "+" -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ");
System. The out. Println (" brand size configuration the inventory price ");
System. Out.println (macSize macBrand + "" + + +" "+" "+ macPrice macConfig +" + "

MacCound);
System. Out.println (thinSize thinkpadBrand + "" + + +" "+" "+ thinPrice thinConfig +" + "
ThinCound);
System. Out.println (ASUSPric ASUSBrand + "" + + +" "+" "+ ASUSSize ASUSConfig +" + "
ASUSCound);
System. The out. Println (" -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ");
//statistics to the total number of inventory, inventory total amount
Int totalcount=macCound + thinCound + ASUSCound;
Double totalMoney=(macCound * macPrice) + (thinCound * ASUSCound) + (ASUSSize * ASUSCound);
System. The out. Println (" pool number: : "+ totalcount);
System. The out. Println (" total amount of inventory goods: "+ totalMoney);



}

Layout think can also,,
Hope everyone together in a
Come on. ?? _???? )?

CodePudding user response:

Thanks for sharing, and learning.
  • Related