Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Supplier {
- private int supplierId;
- private String companyName;
- private String contactName;
- private final static String DEFAULT_CONTACT_NAME = "NO NAME ENTERED";
- public Supplier() {
- }
- public Supplier(int supplierId, String companyName, String contactName) {
- this(supplierId, companyName);
- this.contactName = contactName;
- /*this.supplierId = supplierId;
- this.companyName = companyName;
- this.contactName = contactName;
- */
- }
- public Supplier(int supplierId, String companyName) {
- this.supplierId = supplierId;
- this.companyName = companyName;
- this.contactName = DEFAULT_CONTACT_NAME;
- }
- public int getSupplierId() {
- return supplierId;
- }
- public void setSupplierId(int supplierId) {
- this.supplierId = supplierId;
- }
- public String getCompanyName() {
- return companyName;
- }
- public void setCompanyName(String companyName) {
- this.companyName = companyName;
- }
- public String getContactName() {
- return contactName;
- }
- public void setContactName(String contactName) {
- this.contactName = contactName;
- }
- @Override
- public String toString() {
- return "Supplier\n" +
- "Supplier Id = "+ supplierId +
- "\nCompany Name: " + companyName +
- "\nContact Name: " + contactName;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement