Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please make a project that will implement a simple meeting calendar, please don't copy from other answers questions on chegg . I saw those already,

Please make a project that will implement a simple meeting calendar, please don't copy from other answers questions on chegg. I saw those already, I want the way you would write the code. thank you thumbs up for good code and not coping from other already answers questions.

The learning objectives for this assignment are:

  • How to implement the Comparable Interface
  • How to implement the Comparator Interface
  • Improve your reading / knowledge of the Java class libraries and documentation
  • Learn to use a TreeMap
  • Learn to use the LocalDateTime class

You will create:

  • An enumeration type with the constants
    • WORK
    • SOCIAL
    • PROFESSIONAL
    • OTHER
  • A class called Contact that (has)
    • A field for the contact's first name
    • A field for the contact's last name
    • A field for the contact's phone number
    • A field for the relationship with the contact (the enumeration type)
    • A constructor with four parameters to initialize each field
    • A getter (accessor) for each field
    • The class should implement the Comparable interface
      • We will define the natural ordering as compare by last name (dictionary ordering) then first name (dictionary ordering)
    • The class should implement the Comparator interface
      • This ordering will be by defined by the Relationship type
  • A class called MeetingCalendar that (has)
    • A field called contactList that is of type List and is a list of Contact objects
    • A field called meetings that is a of type Map and has
      • Keys that are of type LocalDateTime
      • Values that are of type Contact
    • A constructor that
      • Initializes contactList to an empty ArrayList of Contactobjects
      • Initializes meetings to an empty TreeMap with the same key / value pairs
    • An addContact method that takes a Contact object and adds it to the ContactList
    • A method sortByName that sorts the contact list by last name, then first name
    • A method sortByRelationship that sorts the contact list by the relationship type (Hint: The Enum class implements the Comparable interface)

image text in transcribed

  • A method addMeeting that takes a LocalDateTime object and a Contact object and adds it to meetings

image text in transcribed

  • A Driver class that
    • Creates a MeetingCalendar object
    • Adds seven contacts (at least one of each relationship type)
    • Prints the list of contacts
    • Sorts the list by name
    • Prints the list of contacts
    • Sorts the list by relationship type
    • Prints the list of contacts
    • Adds ten meetings (all at different times) including each contact at least once
    • Prints the meetings

NOTES:

  • Do NOT add any fields or methods. Include only those specified
  • Do NOT change the names of any fields, methods, or classes that are specified
A method to print each Contact object in the contact list, one per line as follows: Last First Phone Relationship Manz Snoopy 555-WOOF OTHER . Amethod printMeetings that prints each meeting in meetings as follows Myers, Jack 555-1234 PROFESSIONAL MONDAY, FEBRUARY 22 at 3:30 pm

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

Step: 3

blur-text-image

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

Records And Database Management

Authors: Jeffrey R Stewart Ed D, Judith S Greene, Judith A Hickey

4th Edition

0070614741, 9780070614741

More Books

Students also viewed these Databases questions