Based on the java code given, how to add two feature such as ask user "want to order again? "(Yes/No) and total amount of first order and second order . For example , if an user want to order an apple juice and a aloe vera juice after he ordered an apple juice at the first , then the system will display "want to order again(Y/N)?" . After he order all the juice he want, then the system will display the total amount of first order and second order.
Based on the java code given, how to add two feature such as ask user "want to order again? "(Yes/No) and total amount of first order and second order .
For example , if an user want to order an apple juice and a aloe vera juice after he ordered an apple juice at the first , then the system will display "want to order again(Y/N)?" . After he order all the juice he want, then the system will display the total amount of first order and second order.
import java.util.Scanner; public class Main { public static void main(String[] args) { System.out.println("Enter 1 for apple juice and 2 for aloe vera juice "); |
Step by step
Solved in 4 steps with 3 images