Create class called Customer that has the below attributes custId int custName String emailId String contactNo long Create other classMemberShip that...
Question Get Answer

Create class called Customer that has the below attributes custId

int

custName

String

emailId

String

contactNo

long

 

Create other class MemberShip that has the below attributes 

membershipId

int

membershipType

String

visitsPerYear

int

customer

Customer

 

Attributes should be private.

Customer has to set to the membership via constructor injection in the XML file. 

Create class called Driver with the main method and write the logic to get input from the user such as the customer details, membership details and display the details to verify the correctness of your code. (Note: UI will not be tested).

 Design Constraints

Customer class and the MemberShip class should be present in com.spring.app package.

Write appropriate getters and setters and constructors

The className/Attribute Name/PackageName should be same as specified in the problem statement. Do not create new packages.

The XML configuration should be done in the file applicationContext.xml. This XML should be available under the resources folder of the created maven project.

The Customer bean in the applicationContext.xml should have id value as "custObj"

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Let our 24/7 Java Programming tutors help you get unstuck! Ask your first question.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes