A wireless telephone company has some options for new customers. Three of the fo
ID: 3879446 • Letter: A
Question
A wireless telephone company has some options for new customers. Three of the following: (1) Buy the phone for $200 and sign a contract for two years witha monthly charge of $96, (2) Lease the phone for $600 by paying $144 per month with an option to buy the phone. The $144 will include the lease amount and monthly phone charges. The purchase price after two years is $100. (3) Buy the phone for $600 and pay $60 per month without a two-year contract. Write a program to implement it with proper messages. The program should educate the user by showing the total cost at the end of two years, for comparison. The user should be able to choose one of the options and ased on that, the program should print the total cost for two years.Explanation / Answer
The code is
import java.util.*;
public class MyClass {
public static void main(String args[]) {
System.out.println("Which option do you want to choose?");
System.out.println("1)Buy the phone with contract 2)Lease the phone 3)Buy the phone without contract");
Scanner in =new Scanner(System.in);
int opt=in.nextInt();
if(opt==1)
{
System.out.println("The total cost incurred will be "+(200+96*24));
}
else if (opt==2)
{
System.out.println("The total cost incurred will be "+
"If you don't buy the phone "+(144*24));
System.out.println("The total cost incurred will be "+
"If you do buy the phone "+(144*24+100));
}
else
{
System.out.println("The total cost incurred will be "+(600+60*24));
}
}
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.