Contact us - +12567847275

Programming Homework Help

CISS 110 Rutgers University Newark Java Debugging a Code

 

I’m stuck on a Java question and need an explanation.

/* d31.java

save as db31.java and debug the errors. There are three possibilities.

You can get a burger with fries, a burger without fries, or nothing –

you can’t just get fries. Use compound blocks where necessary.

*/

public class d31

{

public static void main(String[] args)

{

char userschoice;

double bill = 0.0;

System.out.print(“Do you want a burger? “);

System.out.print(“Enter y or n: “);

userschoice = System.in.read();

System.in.read();

if(usersChoice = ‘y’)

bill += 2.59;

System.out.print(“Fries with that burger? “);

System.out.print(“Enter y or n: “);

userschoice = System.in.read();

System.in.read();

if (userschoice = ‘y’)

bill += .89;

System.out.printf(“Bill is %.2fn”, bill);

}

}

Solution:

15% off for this assignment.

Our Prices Start at $11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!

Why US?

100% Confidentiality

Information about customers is confidential and never disclosed to third parties.

Timely Delivery

No missed deadlines – 97% of assignments are completed in time.

Original Writing

We complete all papers from scratch. You can get a plagiarism report.

Money Back

If you are convinced that our writer has not followed your requirements, feel free to ask for a refund.