Untitled
unknown
java
4 years ago
1.4 kB
12
Indexable
package com.cuadong;
import java.util.Scanner;
public class SUPPLIER {
private String ID;
private String Name;
private String PhNo;
private String Address;
private String getID(){
return this.ID;
}
private void setID(String ID) {
this.ID = ID;
}
private String getName() {
return this.Name;
}
private void setName(String Name) {
this.Name = Name;
}
private String getPhNo() {
return this.PhNo;
}
private void setPhNo(String PhNo) {
this.PhNo = PhNo;
}
private String getAddress() {
return this.Address;
}
private void setAddress(String Address) {
this.Address = Address;
}
public SUPPLIER() {}
public SUPPLIER(String ID, String Name, String PhNo) {
this.ID = ID;
this.Name = Name;
this.PhNo = PhNo;
}
public void InputSupplier() {
Scanner scanner = new Scanner(System.in);
System.out.print("Enter ID: ");
this.ID = scanner.nextLine();
System.out.print("Enter Name: ");
this.Name = scanner.nextLine();
System.out.print("Enter PhNo: ");
this.PhNo = scanner.nextLine();
System.out.print("Enter Address: ");
this.Address = scanner.nextLine();
scanner.close();
}
public void ShowSupplier() {
System.out.println("ID: " + this.ID);
System.out.println("Name: " + this.Name);
System.out.println("PhNo: " + this.PhNo);
System.out.println("Address: " + this.Address);
}
}Editor is loading...