Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Can I get an answer to this easy Java question in 30 minute to onre hour please.

ID: 3814051 • Letter: C

Question

Can I get an answer to this easy Java question in 30 minute to onre hour please. Thank you.

Name: PLEASE IN CLASS Assignment A2 WRITE YOUR NAME AND HAND THIS DOCUMENT AFTER YOU SUBMIT YOUR ASSIGNMENT VIA BB SUBMIT ONLY THE JAVA CODE NOT THE CLASS FILE You are assigned to a team to design SAvA code to make report for opTIMA Company. You have to write SAvA code to classify the customers into the corresponding level based on the following information (Given) Level Reward% Gold 25% Silver 20% Norma 15% Default 5% The levels must be displayed by your code as drop down menu: Optima Customer Level What is the customer level? SILVER favor DEFULT When you choose the level a corresponding window will be displayed, for example if you choose Normal then the window will be displayed is: OPTIMA Sadiq Level is Normal Reward is 20 percent When you hit OK you will be prompted to repeat window such as: OPTIMA Sadiq Do you want to continue with other entry? res Cancel click then the program will continue with other calculation, for No or cancel the program will If you yes Use Case statement to find the above result. Deliverable BB-Assignment folder. Complete OPTIMA2.Java program (only) via

Explanation / Answer

import java.util.Scanner;

public class Discount

{

public static void main(String[] args)

{

String cust_name;

String cust_surname;

String answer;

String answer2;

float firstPrice, rate_1, D_rate, discount, final_price, prem_disc;

prem_disc = 0;

final_price = 0;

discount = 0;

Scanner in = new Scanner(System.in);

System.out.println("Enter Costumer's Name:");

cust_name = in.next();

cust_surname = in.next();

System.out.println("Have you bought anything?");

answer = in.next();

if (answer.equals("no"))

{

System.out.println("Have a good day!");

System.exit(0);

}

else if (!answer.equals("no"))

System.out.println("Enter Price of Item:");

firstPrice = in.nextFloat();

System.out .println("What type of membership do you have? Premium, Gold, Silver or simple?");

answer2 = in.next();

if (answer2.equals("Premium"))

{

prem_disc = 20;

discount = (firstPrice * 20 / 100);

final_price = (firstPrice - discount);

}

else if (answer2.equals("Gold"))

{

prem_disc = 15;

discount = (firstPrice * 15 / 100);

final_price = (firstPrice - discount);

}

else if (answer2.equals("Silver"))

{

prem_disc = 10;

discount = (firstPrice * 10 / 100);

final_price = (firstPrice - discount);

}

else if (answer2.equals("simple"))

{

prem_disc = 10;

discount = (firstPrice * 10 / 100);

final_price = (firstPrice - discount);

}

System.out.println("Costumer Name:" + cust_name + " " + cust_surname + " " + "Discount Rate:" + prem_disc + " " + "Discounted Price:" + final_price + " ");

}

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote