Posted: January 27th, 2021
Computer Science work essay
Assessment Brief
Problem: Appointments•Write a Java class named Appointment.java representing appointments you make. You will be modeling the equivalent of a real world appointment using Java.•This class should include several pieces of data as instance variables:•day of the week: (integer with 0 representing Sunday and 6 representing Saturday)•who the appointment is with (String)•duration of the appointment (double)•start time of the appointment (double with 0.0 representing midnight, 12.0 representing noon, and(for example) 15.0 representing 3pm. For this assignment, you can assume all appointments begin either on the hour or on the half-hour.)•The Appointment class will have several methods•get/set methods for each instance variable (all of which should be declared private).•getDay, setDay•getPerson, setPerson•getDuration, setDuration•getStartTime, setStartTime•3 constructors: a default constructor with no parameters, a constructor with 4 parameters (day, start time, duration, and person in that order), and a copy constructor which makes a new object from the current state of another object (passed as a parameter).•the toString method. As discussed in class, this method is very useful for working with (and debugging!) objects and object variables. It should return a reasonable representation of the object based on the instance variable values, but the exact format of that String is up to you.•the method reschedule which takes a new start time and a new duration and updates the currentappointment.•the method conflictsWith which takes an Appointment object as a parameter. This function returns a boolean value based on whether or not the current appointment and the parameter variable appointment conflict with each other. For the purposes of this assignment, a conflict is defined as two appointments on the same day of the week whose times overlap by some amount.•Testing your solution:•You will need to write a class, say AppointmentTests.java, which instantiates (creates) a number of Appointment object variables and tests your functions above. How you write this file is entirely up to you, as it is strictly for your own testing purposes.
How Do I Choose the Right Writer?
We match you with a writer based on your subject and academic level, but you can also request a preferred writer if you have worked with someone before. Browse writer profiles or let our system pick the best fit for your needs. Each writer brings specialized knowledge in their field, ensuring subject-matter expertise for your assignment. Students looking for an essay writer can review qualifications to find their perfect match. Our team ensures every writer is vetted for expertise, so you are always in good hands.
Order | Check Discount
Tags: write my essay online, Thesis Help UK, Dissertation Writing Services, Cheap Essay Writing Service