Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package prelim_carpost;
- import java.util.Scanner;
- public class Prelim_Carpost {
- public static void main(String[] args, double rate, Double lto_fee) {
- String name;
- Double brand_car, m_yr, sel_price, lto_rf, compre_if, chattel_mf, d_rate,r,fee,fees, t_price;
- Scanner x = new Scanner (System.in);
- System.out.println("Customer's Name: ");
- name = x.nextLine();
- System.out.println("Brand of Car: ");
- brand_car = x.nextDouble();
- System.out.println("Model Year Model: ");
- m_yr = x.nextDouble();
- System.out.println("Selling Price: ");
- sel_price = x.nextDouble();
- System.out.println("LTO Registration Fee: ");
- lto_rf = x.nextDouble();
- System.out.println("Comprehensive Insurance Fee: ");
- compre_if = x.nextDouble();
- System.out.println("Chattel Mortgage Fees: ");
- chattel_mf = x.nextDouble();
- if (m_yr == 2020 ) {
- d_rate = 0.00;
- }
- else if (m_yr == 2018 && m_yr ==2019 ){
- d_rate = 0.02;
- }
- else if (m_yr == 2016 && m_yr == 2017){
- d_rate= 0.05;
- }
- else if (m_yr == 2014 && m_yr <= 2018){
- d_rate = 0.07;
- }
- else {
- d_rate = 0.10;
- }
- rate = d_rate / 100;
- fee = lto_fee + compre_if + chattel_mf;
- fees =fee+ (fee*0.12);
- t_price = fees * d_rate;
- System.exit(0);
- }
- } // TODO code application logic here
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement