Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package samson_angel;
- import java.util.*;
- public class Samson_Angel {
- private int ID;
- private String name = "";
- private int age;
- private String address = "";
- public int getUniqueID(){
- return ID;
- }
- public void setID(int newID){
- this.ID = newID;
- }
- public String getName(){
- return name;
- }
- public void setName(String newName){
- this.name = newName;
- }
- public int getAge(){
- return age;
- }
- public void setAge(int newAge){
- this.age = newAge;
- }
- public String getAddress(){
- return address;
- }
- public void setAddress(String newAddress){
- this.address = newAddress;
- }
- static void Info(){
- Samson_Angel Person = new Samson_Angel();
- Scanner sc = new Scanner(System.in);
- System.out.println("Person Information Sheet");
- System.out.print("Enter your ID: ");
- Person.setID(sc.nextInt());sc.nextLine();
- System.out.print("Enter your Name: ");
- Person.setName(sc.nextLine());
- System.out.print("Enter your Age: ");
- Person.setAge(sc.nextInt());sc.nextLine();
- System.out.print("Enter your Address: ");
- Person.setAddress(sc.nextLine());
- System.out.println("ID: " + Person.getUniqueID());
- System.out.println("Name: " + Person.getName());
- System.out.println("Age: " + Person.getAge());
- System.out.println("Address: " + Person.getAddress());
- }
- public static void main(String[] args){
- Info();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment