// Login name: cbdreier
// Programmer: Christopher Dreier
// Course: 1214-092
// Lab: 3
// Description: Selection Statements

import java.io.*;

public class L3
{
  public static void main(String[] args)
  {        
    printInfo();        
    insurance(8, false, true);
  }
  
  public static void printInfo()
  {
    System.out.println( );      

    System.out.println("----------------------------------------------------------------");

    System.out.println("Login name: cbdreier");

        System.out.println("Programmer: Christopher Dreier");

        System.out.println("Course: 1214-092");

        System.out.println("Lab: 3");
  
        System.out.println("Description: Selection Statements");

        System.out.println("----------------------------------------------------------------");

      }

    public static void insurance(int cycles, boolean woman, boolean no_accident)
      
      {    
 
        int prem = 300; 
        

        switch (cycles)
         
          {


            case 8:
  
              if (no_accident)
                if (woman)
                  prem = ((prem * 115)/100);
                else
                  prem = ((prem * 12)/10);
              else
                if (woman)
                  prem = ((prem * 19)/10);
                else
                  prem = (prem * 2);        

              break;

            case 4:
              
              if (no_accident)
                break;
              else
                prem = ((prem * 12)/10);
          
              break;
            
            case 6:

              if (no_accident)
                prem = ((prem * 11)/10);
              else
                if (!woman)
                  prem = ((prem * 13)/10);

              break;
              
            default:
              System.out.println();
              System.out.println("Insurance company does not cover ");        
              System.out.print(+ cycles + "-cyl cars.");
          }

        if (cycles == 4 || cycles == 6 || cycles == 8)
          {  
            System.out.println();
            System.out.println("Premium is " + prem);
          }     false, true);
  }
}        