Help me fix the codeAnd please help me write the @param for mealCost at line 28 Thank you =EXCELLENT SERVICE)Testers6667t=0.25 nealCost;Running RestaurantBillTester.java6869fail pass pass...

Help me fix the code And please help me write the @param for mealCost at line 28 Thank you
DUSnoourd | Grad... Yuzu Reader: Big.<br>Typing Practice O Online Cou<br>89<br>60<br>98<br>61<br>62<br>else if(serviceQuality==G00D_SERVICE)<br>CodeCheck<br>Reset<br>Download<br>63<br>t=0.2 mealCost;<br>64<br>65<br>else if(service@uality>=EXCELLENT SERVICE)<br>Testers<br>66<br>67<br>t=0.25 nealCost;<br>Running RestaurantBillTester.java<br>68<br>69<br>fail pass pass pass pass fall fail pass pass pass pass pass pass pass pass pass pass pass<br>return t;<br>70<br>RestaurantBill(Cost:50.95, Service:-1, Total:55.7265625)<br>Expected: RestaurantBill(Cost:50.95, Service:0, Total:58.2740625)<br>RestaurantBill(Cost:10.0, Service:3,Total:134.375)<br>Expected: RestaurantBill(Cost:100.0,Service:3, Total:134.375)<br>RestaurantBill(Cost:20.0,Service:2, Total: 25.875)<br>Expected: RestaurantBill(Cost:20.0, Service:2, Total.25.875)<br>RestaurantBill(Cost:10.0,Service:1,Total:11.9375)<br>Expected: RestaurantBill(Cost:10.0, Service:1, Total:11,9375)<br>RestaurantBill (Cost:10.0, Service:0,Total:11.4375)<br>Expected: RestaurantBill(Cost:10.0,Service:0, Total:11.4375)<br>RestaukantBill(Cost:78.19, Service:4,Total:105.0678125)<br>Expected: RestaurantBill(Cost:78.19, Service:3 Total:165.8678125)<br>71<br>* find thể tax<br>* @return tax<br>72<br>73<br>74<br>75<br>public double tax()<br>76<br>77<br>return mealCost TAX RATE;<br>78<br>79<br>80<br>* find the restaurant total bill cost<br>* @return the restaurant bill cost<br>81<br>82<br>83<br>public String tostring()<br>84<br>8.00<br>Expected: 2.55<br>25.00<br>Expected: 25.00<br>85<br>return RestaurantBill(Cost: nealCost +. Service: +serviceQuality +,Total: +(tip() + neal Cost + tax() +

Extracted text: DUSnoourd | Grad... Yuzu Reader: Big. Typing Practice O Online Cou 89 60 98 61 62 else if(serviceQuality==G00D_SERVICE) CodeCheck Reset Download 63 t=0.2 mealCost; 64 65 else if(service@uality>=EXCELLENT SERVICE) Testers 66 67 t=0.25 nealCost; Running RestaurantBillTester.java 68 69 fail pass pass pass pass fall fail pass pass pass pass pass pass pass pass pass pass pass return t; 70 RestaurantBill(Cost:50.95, Service:-1, Total:55.7265625) Expected: RestaurantBill(Cost:50.95, Service:0, Total:58.2740625) RestaurantBill(Cost:10.0, Service:3,Total:134.375) Expected: RestaurantBill(Cost:100.0,Service:3, Total:134.375) RestaurantBill(Cost:20.0,Service:2, Total: 25.875) Expected: RestaurantBill(Cost:20.0, Service:2, Total.25.875) RestaurantBill(Cost:10.0,Service:1,Total:11.9375) Expected: RestaurantBill(Cost:10.0, Service:1, Total:11,9375) RestaurantBill (Cost:10.0, Service:0,Total:11.4375) Expected: RestaurantBill(Cost:10.0,Service:0, Total:11.4375) RestaukantBill(Cost:78.19, Service:4,Total:105.0678125) Expected: RestaurantBill(Cost:78.19, Service:3 Total:165.8678125) 71 * find thể tax * @return tax 72 73 74 75 public double tax() 76 77 return mealCost TAX RATE; 78 79 80 * find the restaurant total bill cost * @return the restaurant bill cost 81 82 83 public String tostring() 84 8.00 Expected: 2.55 25.00 Expected: 25.00 85 return RestaurantBill(Cost: nealCost +. Service: +serviceQuality +,Total: +(tip() + neal Cost + tax() +")"); 86 87 88 } 89 4.00 Expected: 4.00 1.00 90 Expected: 1.00 0.59 Reset Download CodeCheck Expected: 0.50 19.55 Expected: 19.55 4.78 Testers Running RestaurantBilITester.java Expected: 4.78 9.38 Expected: 9.38 1.88 Eroacted1 fall pass pass pass pass fail fail pass pass pass pass pass pass pass pass pass pass pass RestaurantBill(Cost:50.95,Service:-1, Total:55.7265625) Expected: RestaurantBill(Cost:50,95,Service:0,Total:58.2740625) RestaurantBill (Cost:100.0.Service:3,Total:134.375) MacBook
32<br>8 public class RestaurantBill<br>9 {<br>public static final int EXCELLENT SERVICE = 3;<br>11<br>public RestaurantBill(double nealCost, int serviceQuality)<br>34<br>{<br>10<br>35<br>if (mealCost < MIN COST)<br>public static final int GOOD SERVICE = 2;<br>public static final int FAIR SERVICE = 1;<br>public static final int POOR SERVICE = 0;<br>36<br>12<br>37<br>this mealCost = MIN COST;<br>13<br>38<br>14<br>39<br>else<br>public static final double MIN COST = 10.0;<br>public static final double TAX RATE = (9.375 /100);<br>public static final double EXCELLENT_TIP = (25.0/180);<br>18<br>15<br>40<br>%3D<br>16<br>41<br>this.nealCost= nealCost;<br>17<br>42<br>%3D<br>public static final double GOOD_TIP = (20.0/100);<br>public static final double POOR_TIP = (5.0/100);<br>public static final double FAIR_TIP = (10.0/100);<br>43<br>19<br>44<br>this.serviceQuality = serviceQuality;<br>%3D<br>20<br>45<br>21<br>46<br>private double mealCost;<br>23<br>22<br>find the tip of the service<br>* ereturn the tip anount<br>47<br>private int serviceQuality;<br>private double tax;<br>25<br>48<br>24<br>49<br>50<br>public double tip()<br>26 **<br>27* get the mealcost and service<br>28 GParam mealCost with if leargest then MIN Cost and else for mealCost equal to MIN Cost<br>29 eparam serviceQuality with else<br>30 /<br>51<br>52<br>double t=0;<br>53<br>if(serviceQuality==P00R SERVICE)<br>55<br>t=9.05ªnealCost;<br>31<br>56<br>32<br>57<br>else if(serviceQuality==FAIR SERVICE)<br>public RestaurantBill(double mealCost, int serviceQuality)<br>34<br>33<br>58<br>59<br>t=0.1'neal.Cost;<br>35<br>if (mealCost < MIN_COST)<br>36<br>this.nealCost = MIN_ COST;<br>61<br>else if(serviceQuality=GO00 SERVICE)<br>37<br>62<br>38<br>63<br>t=0.2*nealCost;<br>39<br>else<br>64<br>40<br>this.meal Coste nealCost;<br>65<br>else if(serviceQuality>=EXCELLENT_SERVICE)<br>41<br>42<br>66<br>43<br>67<br>t-0.25*nealCost;<br>44<br>68<br>this.serviceQuality = serviceQuality;<br>}<br>45<br>69<br>return t;<br>46<br>**<br>70<br>71<br>/**<br>MacBook<br>

Extracted text: 32 8 public class RestaurantBill 9 { public static final int EXCELLENT SERVICE = 3; 11 public RestaurantBill(double nealCost, int serviceQuality) 34 { 10 35 if (mealCost < min="" cost)="" public="" static="" final="" int="" good="" service="2;" public="" static="" final="" int="" fair="" service="1;" public="" static="" final="" int="" poor="" service="0;" 36="" 12="" 37="" this="" mealcost="MIN" cost;="" 13="" 38="" 14="" 39="" else="" public="" static="" final="" double="" min="" cost="10.0;" public="" static="" final="" double="" tax="" rate="(9.375" 100);="" public="" static="" final="" double="" excellent_tip="(25.0/180);" 18="" 15="" 40="" %3d="" 16="" 41="" this.nealcost="nealCost;" 17="" 42="" %3d="" public="" static="" final="" double="" good_tip="(20.0/100);" public="" static="" final="" double="" poor_tip="(5.0/100);" public="" static="" final="" double="" fair_tip="(10.0/100);" 43="" 19="" 44="" this.servicequality="serviceQuality;" %3d="" 20="" 45="" 21="" 46="" private="" double="" mealcost;="" 23="" 22="" find="" the="" tip="" of="" the="" service="" *="" ereturn="" the="" tip="" anount="" 47="" private="" int="" servicequality;="" private="" double="" tax;="" 25="" 48="" 24="" 49="" 50="" public="" double="" tip()="" 26="" **="" 27*="" get="" the="" mealcost="" and="" service="" 28="" gparam="" mealcost="" with="" if="" leargest="" then="" min="" cost="" and="" else="" for="" mealcost="" equal="" to="" min="" cost="" 29="" eparam="" servicequality="" with="" else="" 30="" 51="" 52="" double="" t="0;" 53="" if(servicequality="=P00R" service)="" 55="" t="9.05ªnealCost;" 31="" 56="" 32="" 57="" else="" if(servicequality="=FAIR" service)="" public="" restaurantbill(double="" mealcost,="" int="" servicequality)="" 34="" 33="" 58="" 59="" t="0.1'neal.Cost;" 35="" if="" (mealcost="">< min_cost)="" 36="" this.nealcost="MIN_" cost;="" 61="" else="" if(servicequality="GO00" service)="" 37="" 62="" 38="" 63="" t="0.2*nealCost;" 39="" else="" 64="" 40="" this.meal="" coste="" nealcost;="" 65="" else="" if(servicequality="">=EXCELLENT_SERVICE) 41 42 66 43 67 t-0.25*nealCost; 44 68 this.serviceQuality = serviceQuality; } 45 69 return t; 46 ** 70 71 /** MacBook
Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here