Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Please don't answer if you cannot complete all the requirements. This question has been answered but it was incorrect!!!

You are to write the following PersonalCalendar, Event and Appointment classes and other interfaces or classes as necessary. Note that there is no main method required in this assignment; a JUnit test will be used instead.

Some details of the implementation are left to you. Other details are implied, but not stated directly, in the description. (That said, don't over think this; do the minimum required to perform the specified function.)

You are to write a class PersonalCalendar. Entries in a PersonalCalendar can be either an Event or an Appointment. Entries can be added to, returned from and removed from the PersonalCalendar.

An Event has a date consisting of ints for year, month, dayOfMonth, hour and minute. It also has a String description, a String location and an int duration in minutes. Events do not have attendees. Two Event objects are equal if their dates and descriptions are equal.

An Appointment has a date consisting of ints for year, month, dayOfMonth, hour and minute. It has an int duration in minutes and a String description.

An Appointment also has an ArrayList of Strings for attendees. Attendees can be added to an Appointment. An Appointment does not have a location--that's assumed to be my office. Appointment has an equals method that compares dates and descriptions to determine equality.

A PersonalCalendar maintains its entries sorted by date, not the order the entries were inserted. Thus the first element of a PersonalCalendar is always the fist element chronologically, regardless of the order the elements were added. If two elements have exactly the same date and time, description is used to break the tie. (Hint: GregorianCalendar and Collections.sort. Also let your IDE help you write commonly used code.)

You are to write a JUnit test to verify that a PersonalCalendar object maintains its entries in the correct order.

Here are some bullets I will use in grading

PersonalCalendar accepts both Event and Appointment objects

PersonalCalendar does not accept objects such as String

PersonalCalendar keeps its content sorted appropriately

Event implements the specified function

Appointment implements the specified function

JUnit tests verify the following:

A PersonalCalendar with a single Appointment or Event contains the expected object.

A PersonalCalendar returns its objects sorted first by date and then description, regardless of the order the objects were added, and regardless of whether the items were all Events, or all Appointments, or a mixture.

My JUnit test class was long, but that was mostly because I did a lot of copy/paste for test setup. None my other components were more than 50 lines of code.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M93082672

Have any Question?


Related Questions in Computer Engineering

Problem belowwrite a program that uses a function that

Problem below: Write a program that uses a function that returns a number between 1 and 6. Use this function to simulate the roll of a die. Allow the user to specify the number of trials and then tabulate that number of ...

Submit an annotated bibliography that includes the

Submit an annotated bibliography that includes the following: At least one resource from each of the following categories: Culture-specific information about your own culture Articles about a tradition, value, or belief ...

Describe some of the advantages and disadvantages of using

Describe some of the advantages and disadvantages of using the N-version programming approach.

Give a recursive algorithm that generates a similar series

Give a recursive algorithm that generates a similar series of coins for changing n cents. Don't use dynamic programming for this problem.

Structureswrite the program in c onlytask create a seating

Structures Write the Program in C++ only. Task: Create a seating reservation program for Podunk Airlines. The air fleet consists of a single plane with a seating capacity of 12. The plane makes one flight daily. Your pro ...

A compute the sumnbsps1nbsp 1 2 3 nbsp nbsp 9999 the sum

(a) Compute the sum S1 = 1 + 2 + 3 + . . . + 9999 (the sum of all integers from 1 to 9999). Do not use a program. (b) Compute the sum S2 = 1+3+5+...+9999 (the sum of all odd integers from 1 to 9999). Do not use a program ...

While you were shopping at best buy you overhear a customer

While you were shopping at Best Buy, you overhear a customer asking one of the sales staff in the store about what is the fastest computer in the store that he can buy? The staff replies, "you're looking at our AMD machi ...

Question please review the description of the organization

Question: Please review the description of the organization that is the subject of your semester project. The description of that organization, CITY GENERAL HOSPITAL, is described in the instructions for Phase I that you ...

Question suppose you are given a set of cities p number of

Question : Suppose you are given a set of cities (p number of cities) and there longitude and latitude coordinates. You need to determine the two closest cities. Write an algorithm to determine the two closest cities. As ...

Please explain to me the concept of policing with emphasis

Please explain to me the concept of policing with emphasis on the "leaky bucket" mechanism

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As