Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Writeaprogramthatcomputestaxandtiponarestaurantbill. Askusertoinputthebillamountandthetippercentagehe/shew antstogivetothewaiter (asaper centvalue).Thetaxshouldbe10%ofthemeal cost, andmustbeseta saconstantinyourcode.Thetipshouldbecalculateda fteraddingtax.Displaythemeal cost, taxamount, tipamount, andtotal billonthescreen.Seesampleinteraction withauserbelow. Makesur etheorderof valuesinyour outputisthesameasintheexample.Thator derisimportantwhenpassingtheCode Gradeautotests. Roundyourresultsto2digitsaf terdecimalpoint. Seecodethatillustrate showtodothat.Nameyoursource
Writeaprogramthatcomputestaxandtiponarestaurantbill. Askusertoinputthebillamountandthetippercentagehe/shew antstogivetothewaiter (asaper centvalue).Thetaxshouldbe10%ofthemeal cost, andmustbeseta saconstantinyourcode.Thetipshouldbecalculateda fteraddingtax.Displaythemeal cost, taxamount, tipamount, andtotal billonthescreen.Seesampleinteraction withauserbelow. Makesur etheorderof valuesinyour outputisthesameasintheexample.Thator derisimportantwhenpassingtheCode Gradeautotests. Roundyourresultsto2digitsaf terdecimalpoint. Seecodethatillustrate showtodothat.Nameyoursource fileRestaurant Bill.java. AnyothernamewillberejectedbyCode Grade. Enterthebillamount 100 Enterthetipper centage : 20Themeal costis :100.0 The tax amount is: 10.0Thetipamountis :22.0 The total bill is: 132.0 Writeaprogramthatcomputestaxandtiponarestaurantbill. Askusertoinputthebillamountandthetippercentagehe/shew antstogivetothewaiter (asaper centvalue).Thetaxshouldbe10%ofthemeal cost, andmustbeseta saconstantinyourcode.Thetipshouldbecalculateda fteraddingtax.Displaythemeal cost, taxamount, tipamount, andtotal billonthescreen.Seesampleinteraction withauserbelow. Makesur etheorderof valuesinyour outputisthesameasintheexample.Thator derisimportantwhenpassingtheCode Gradeautotests. Roundyourresultsto2digitsaf terdecimalpoint. Seecodethatillustrate showtodothat.Nameyoursource fileRestaurant Bill.java. AnyothernamewillberejectedbyCode Grade. Enterthebillamount 100 Enterthetipper centage : 20Themeal costis :100.0 The tax amount is: 10.0Thetipamountis :22.0 The total bill is: 132.0
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started