Answer to Question #250194 in Java | JSP | JSF for kayjay

Question #250194

Draw a flowchart. do not output the number of minutes during which the service is used.

a. regularBill: This method calculates and returns the billing amount for regular

service.

b. premiumBill: This method calculates and returns the billing amount for premium

service.



1
Expert's answer
2021-10-13T00:29:46-0400
import java.util.Scanner;
public class Main
{
	public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
		System.out.println("Enter price for Regular services: ");
		int regularBill=in.nextInt();
		System.out.println("Enter price for premium services: ");
		int premiumBill=in.nextInt();
		System.out.println("Choose type of service:\n1. Regular service\n2. Premium service");
		int c=in.nextInt();
		if(c==1){
		    System.out.println("Regular bill: "+regularBill);
		}
		else if (c==2){
		    System.out.println("Premium bill: "+premiumBill);
		} 
	}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS