Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a Folder in your Java Code Folder called assignment1- . Open VSCode and open that folder. Create an enumerated type called BirthdayMonth that has

  1. Create a Folder in your Java Code Folder called assignment1-. Open VSCode and open that folder.
  2. Create an enumerated type called BirthdayMonth that has the following possible values:
    1. JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, NOV, DEC
  3. Create a class called Customer:
    1. The customer needs a first name, a last name, a customer ID, a BirthdayMonth, and an email address.
    2. Build a constructor that takes firstName, lastName, birthdayMonth, and emailAddress. Notice that you are not asking for customerID. You will generate your ownCustomerID that is unique for every Customer object
      1. Add a class (static) variable called nextAvailableID to your Customer Class.
      2. In the constructor, you will assign the value of the class variable, nextAvailableID, to the instance variable customerID and then you will increment the nextAvailableID by one.
      3. That way, each time you instantiate a new Customer Object, the customerID will be unique and 1 greater than the last customerID assignened. This works because nextAvailableID is static and exists outside of any objects.
  4. Write a class called Start
    1. that will instantiate a customer using realistic data
    2. Print out the customerID for this customer. It should be 0.
    3. Instantiate a second customer. Its customerID should automatically be 1.
    4. Create a ragged array of Customers with 3 Customers in the first row and 2 Customers in the second row. Again, use realistic data when creating these Customers
    5. Use loops to print out the names of all Customers in the following format:

Customer1, Customer2, Customer3

Customer4, Customer5

  1. Write a Customer Relationship Management class called CRM that :
    1. Contains an instance variable called customers that is an Array that can hold 20 references to Customer objects.
    2. Contains an instance variable called numCustomers that always has the number of customers that have been added to the CRM system.
    3. A method called addCustomer that accepts a Customer, correctly adds that Customer to the customers array, and increments the numCustomers variable.
    4. A method called getAllCustomerEmails which returns a String containing all Customers email addresses, separated by semi-colons:

Email1; email2; email3; email4; email5;

  1. A method called printBirthdayCards that will print out birthday cards for every Customer whos birthMonth is equal to the BirthdayMonth that was passed to it.
    1. For example, if Customer 3 and 5 have birthdays in May, and you called the method printBirthdayCards(BirthdayMonth.MAY) , you would print the following:

Dear ,

Happy Birthday! In honour of your birthday this month, we are happy to give you this coupon for $2 off on any order over $100,000!

Best Regards,

-------------------------------------------------------

Dear ,

Happy Birthday! In honour of your birthday this month, we are happy to give you this coupon for $2 off on any order over $100,000!

Best Regards,

  1. Return to your main method and write enough code to prove that all your CRM systems works as advertised.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 23rd European Conference Adbis 2019 Bled Slovenia September 8 11 2019 Proceedings Lncs 11695

Authors: Tatjana Welzer ,Johann Eder ,Vili Podgorelec ,Aida Kamisalic Latific

1st Edition

3030287297, 978-3030287290

More Books

Students also viewed these Databases questions

Question

Write short notes on Marketing mix.

Answered: 1 week ago

Question

Analyse the process of new product of development.

Answered: 1 week ago

Question

Define Trade Mark.

Answered: 1 week ago