diff --git a/Dashboard/SpringCoreHandsOns/Constructor Injection/constructorinjection/src/main/java/com/spring/app/MemberShip.java b/Dashboard/SpringCoreHandsOns/Constructor Injection/constructorinjection/src/main/java/com/spring/app/MemberShip.java index 2842490..42e9e7c 100644 --- a/Dashboard/SpringCoreHandsOns/Constructor Injection/constructorinjection/src/main/java/com/spring/app/MemberShip.java +++ b/Dashboard/SpringCoreHandsOns/Constructor Injection/constructorinjection/src/main/java/com/spring/app/MemberShip.java @@ -1,48 +1,57 @@ package com.spring.app; public class MemberShip { - private int membershipId; - private String membershipType; - private int visitsPerYear; - private Customer customer; - - public MemberShip(int membershipId, String membershipType, int visitsPerYear, Customer customer) { - super(); - this.membershipId = membershipId; - this.membershipType = membershipType; - this.visitsPerYear = visitsPerYear; - this.customer = customer; - } - - public int getMembershipId() { - return membershipId; - } - - public void setMembershipId(int membershipId) { - this.membershipId = membershipId; - } - - public String getMembershipType() { - return membershipType; - } - - public void setMembershipType(String membershipType) { - this.membershipType = membershipType; - } - - public int getVisitsPerYear() { - return visitsPerYear; - } - - public void setVisitsPerYear(int visitsPerYear) { - this.visitsPerYear = visitsPerYear; - } - - public Customer getCustomer() { - return customer; - } - - public void setCustomer(Customer customer) { - this.customer = customer; - } + private int membershipId; + private String membershipType; + private int visitsPerYear; + private Customer customer; + + public MemberShip(int membershipId, String membershipType, int visitsPerYear, Customer customer) { + this.membershipId = membershipId; + this.membershipType = membershipType; + this.visitsPerYear = visitsPerYear; + this.customer = customer; + } + + public int getMembershipId() { + return membershipId; + } + + public void setMembershipId(int membershipId) { + this.membershipId = membershipId; + } + + public String getMembershipType() { + return membershipType; + } + + public void setMembershipType(String membershipType) { + this.membershipType = membershipType; + } + + public int getVisitsPerYear() { + return visitsPerYear; + } + + public void setVisitsPerYear(int visitsPerYear) { + this.visitsPerYear = visitsPerYear; + } + + public Customer getCustomer() { + return customer; + } + + public void setCustomer(Customer customer) { + this.customer = customer; + } + + @Override + public String toString() { + return "MemberShip{" + + "membershipId=" + membershipId + + ", membershipType='" + membershipType + '\'' + + ", visitsPerYear=" + visitsPerYear + + ", customer=" + customer + + '}'; + } }