Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class Samson_Item_Main {
- static void main_Method(Scanner sc){
- Samson_Item item = new Samson_Item();
- System.out.println("Enter the Following Information:");
- System.out.print("Item Code: ");
- item.setItemCode(sc.nextInt());sc.nextLine();
- System.out.print("Item Name: ");
- item.setItemName(sc.nextLine());
- System.out.print("Item Classification: ");
- item.setItemClassification(sc.nextLine());
- System.out.print("Item Shelf Number: ");
- item.setItemShelfNumber(sc.nextInt());
- System.out.print("Item Level: ");
- item.setItemLevel(sc.nextInt());
- System.out.print("Item Price: ");
- item.setItemPrice(sc.nextDouble());sc.nextLine();
- System.out.print("Item Packaging: ");
- item.setItemPackaging(sc.nextLine());
- item.display_SamsonItem();
- }
- public static void main(String []args) throws Exception{
- Scanner sc = new Scanner(System.in);
- try{
- main_Method(sc);
- }catch(InputMismatchException er){
- System.out.println("Error Occured, Invalid Data Type. . .");
- }finally{
- sc.close();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment