Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package project;
- // Telecommunication Class
- public class TelecommunicationServiceProviders {
- //Declaration of attributes
- private int companyId;
- private String address;
- //Declaration and initialization of static attribute
- private static int customerAmount;
- // Default Constructor
- public TelecommunicationServiceProviders() // Default Constructor
- {
- companyId=0;
- address="";
- customerAmount=0;
- }
- // Primary Constructor
- public TelecommunicationServiceProviders( int cID, String add, int amount)
- {
- companyId= cID;
- address= add;
- customerAmount= amount;
- }
- //Getters for Attributes
- public int getCompanyId() {
- return companyId;
- }
- public String getAddress() {
- return address;
- }
- public int getCustomerAmount() {
- return customerAmount;
- }
- //Setters for attributes
- public void setCompanyId(int cID) {
- companyId = cID;
- }
- public void setAddress(String add) {
- address = add;
- }
- public void setCustomerAmount(int amt) {
- customerAmount = amt;
- }
- public TelecommunicationServiceProviders(TelecommunicationServiceProviders TelecommunicationServiceProviders)
- {
- companyId= TelecommunicationServiceProviders.getCompanyId();
- address= TelecommunicationServiceProviders.getAddress();
- customerAmount= TelecommunicationServiceProviders.getCustomerAmount();
- }
- public void Display ()
- {
- System.out.println("The Company ID is "+ getCompanyId() +"\n Addresss" + getAddress() +" \n\n Customer total is"+getCustomerAmount());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement