Question: public class RegaliaOrder { / * * * @param args * / public static void main ( String [ ] args ) { / /
public class RegaliaOrder
@param args
public static void mainString args
TODO Autogenerated method stub
final double CUSTOMIZATIONPRICE ;
final double TAX ;
final double sc ;
final double MASTERSHOODPRICE ;
final double BFPRICE ;
final double MFPRICE ;
int numberOfRegalia ;
String typeOfRegalia ;
String design ;
String customization ;
String keepShopping y;
int mCount ;
int bfCount ;
int mfCount ;
int customizationCount ;
Scanner myScan new ScannerSystemin;
System.out.printlnWelcome red bird graduates ;
System.out.printlnM Masters Hood MASTERSHOODPRICE;
System.out.printlnBF Bachelors Cap, Gown, and Tassel BFPRICE;
System.out.printlnMF Masters Cap, Gown, and Tassel MFPRICE;
do
System.out.printlnenter the number of regalia you would like to purchase: ;
numberOfRegalia myScan.nextInt;
for int i ; i numberOfRegalia; i
System.out.printlnWhat typeMBFMF:
;
typeOfRegalia myScan.next;
if typeOfRegaliaequalsIgnoreCaseM
mCount;
else if typeOfRegaliaequalsIgnoreCaseBF
bfCount;
else if typeOfRegaliaequalsIgnoreCaseMF
mfCount;
System.out.printlnWould you like a custom school design yn;
design myScan.next;
if designequalsy
System.out.printlnWe provide the following at $ eash: ;
System.out.printlnA Custom Gown WSchool Custom Zipper Pull and Patch";
System.out.printlnB Custom Tassel WSchool Custom charm ;
System.out.printWhich customization would you like? ab: ;
customization myScan.next;
if customizationequalsIgnoreCasea
customizationCount;
else if customizationequalsIgnoreCaseb
customizationCount;
System.out.printWould you like to keep shopping? yn: ;
keepShopping myScan.next;
while keepShoppingequalsy;
System.out.printlnPlease enter shipping information";
System.out.printFirst Name: ;
String first myScan.nextLine;
System.out.printlast Name: ;
String last myScan.nextLine;
System.out.printStreet Adress: ;
String adress myScan.nextLine;
System.out.printCity: ;
String city myScan.nextLine;
System.out.printState: ;
String state myScan.nextLine;
System.out.printZip code: ;
int zc myScan.nextInt;
System.out.printlnORDER SUMMARY";
System.out.printlnGraduation regalia: numberOfRegalia;
System.out.printlnMasters Hood: mCount;
System.out.printlnBachelors Cap, Gown, and Tassel: bfCount;
System.out.printlnMasters Cap, Gown, and Tassel: mfCount;
System.out.printlnCustom Designs: customizationCount;
double mHoodTotal mCount MASTERSHOODPRICE;
double bftotal BFPRICE bfCount;
double mftotal MFPRICE mfCount;
double customizationTotal CUSTOMIZATIONPRICE customizationCount;
double subtotal mHoodTotal bftotal mftotal customizationTotal;
double fTax TAX subtotal;
double fSC sc subtotal;
double total subtotal fTax fSC;
System.out.printlnSubtotal: subtotal;
System.out.printlntax: fTax;
System.out.printlnShipping cost: fSC;
System.out.printlnTotal: total;
System.out.printlnThis order will be shipped to;
System.out.printlnfirst last;
System.out.printlnadress;
System.out.printlncity state zc;
how do i implement decimal format to this code
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
