Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Bank;
- public class CommercialClient extends Client {
- private String Commercial_Id;
- public CommercialClient() {
- this.Commercial_Id = "00000000000000";
- Set_Nationalid("00000000000000");
- }
- public CommercialClient(String Commercial_Id, String Phone_num, String Address, String Name) {
- this.Commercial_Id = Commercial_Id;
- Set_Nationalid("00000000000000");
- Set_Address(Address);
- Set_Name(Name);
- Set_Phone(Phone_num);
- }
- //Set & Get the Commercial_Id attribute.
- public void Set_Commercialid(String Commercial_Id) {
- this.Commercial_Id = Commercial_Id;
- }
- public String Get_Commercialid() {
- return Commercial_Id;
- }
- ///Override the method toString to make it print the whole information of the class
- @Override
- public String toString() {
- return String.format("The Commertial id of the Company is: " + Get_Commercialid() + "\n"
- +"The national id of the Company is: " + Get_Nationalid() + "\n"
- +"The name of the client is: " + Get_Name() + "\n"
- +"The phone number of the Company is: " + Get_Phone() + "\n"
- +"The Address of the Company is: " + Get_Address() + "\n");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement