Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- *
- * @author Thien
- */
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- import java.util.Scanner;
- /**
- *
- * @author Thien
- */
- public class CDData {
- Scanner input;
- String colName, CDType, title, id;
- int price, YOR;
- public CDData(){
- input = new Scanner(System.in);
- System.out.print("Enter CD ID: ");
- this.id = input.nextLine();
- System.out.print("Enter Collection Name(game/movie/music): ");
- this.colName = input.nextLine();
- System.out.print("Enter CD Type(audio or video): ");
- this.CDType = input.nextLine();
- System.out.print("Enter CD Title: ");
- this.title = input.nextLine();
- System.out.print("Enter price: ");
- this.price = input.nextInt();
- System.out.print("Enter CD's year of release: ");
- this.YOR = input.nextInt();
- }
- public String showDetail(){
- return id+"\t"+colName+"\t"+CDType+"\t"+title+"\t"+price+"\t"+YOR;
- //return id+"\t"+title;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement