home

FINAL PROJECT

import

java.util.Scanner;

public

** class  ** petLicense {

** double  **  myFee  = 0;

** public  ****  static  ****  void  ** main(String[] args) {

System.

// out  //.println(  "Enter which type of pet you have:"  );

Scanner kbd =

** new  ** Scanner(System.//  in  //);

String str = kbd.nextLine;

** char  ** __mycode__ = str.charAt(0);

}

** public  ** petLicense (**  char  ** petcode) {

** char  ** __mycode__ = petcode;

** switch  ** (petcode) {

** case  **  'd'  : **  case  **  'h'  :  // d stands for dog, h for horse

myFee = 10.00;  // the fee for dogs and horses is 10.00

** break  **;

** case  **  'b'  : **  case  **  'c'  : **  case  **  'r'  :  // c stands for cat

myFee = 5.00;  // the fee for cats and rats is 5.00

** break  **;

** case  **  'a'  :

** case  **  'f'  :  // f stands for fish

myFee = 1.00;

** break  **;

** case  **  'o'  :  // o stands for other

myFee = 0.00 ;

** break  **;

** default  **:

System.

// out  //.println(  "License(code): code '"

+ petcode +

"' is invalid" );  // system print license code

System.//exit// (1); } }  }