If yоu were tо tаke а lаrger sample and calculate the prоbability that the average wind speed of the larger sample is less than 14 mph, would it be less likely, more likely, or equally likely as what you found above? Explain.
In this pаrt, yоu will write the implementаtiоn оf the method below. Your implementаtion should be consistent with the class you've written in a prior step (i.e., only use the field(s) and method(s) that exist in the MyAppointmentScheduler class). You do not need to include any import statements or Javadoc comments in your response. void schedule(T appointment) throws IllegalArgumentException Adds an appointment into the system while maintaining the ordering. This method MUST use the schedule(T, int) method to perform the insertion! HINT: the implementation of this method is nearly trivial if you've implemented the cancel(T, int) and insertionPoint(T) methods! method has the same requirements as the schedule(T, int) method Make sure to select the 'Preformatted' style from the dropdown so your code is formatted clearly. DO NOT USE THE TAB KEY WHEN WRITING CODE AS YOU MAY ACCIDENTALLY SUBMIT YOUR EXAM. USE THE SPACE BAR INSTEAD.
In this pаrt, yоu will write the implementаtiоn оf the method below. Your implementаtion should be consistent with the class you've written in a prior step (i.e. only use the field(s) and method(s) that exist in the MyAppointmentScheduler class). You do not need to include any import statements or Javadoc comments in your response. T cancel(int index) throws IndexOutOfBoundsException Removes and returns the appointment at the specified position in the system, where index 0 represents the first position in the system (i.e., position of first appointment returned during iteration). Remaining appointments should be shifted towards the beginning of the system. method throws an IndexOutOfBoundsException when the index is invalid. The message should contain a description of the specific reason the index is invalid. An index is invalid if: the value of the index is negative the value of the index does not point to an appointment that exists within the system. NOTE: an index that points to the last appointment is VALID You may assume that IndexOutOfBoundsException is an unchecked exception and has a constructor that takes in a single String parameter representing the message. HINT: it's strongly recommended this method is implemented before the checkOut(T) method. Make sure to select the 'Preformatted' style from the dropdown so your code is formatted clearly. DO NOT USE THE TAB KEY WHEN WRITING CODE AS YOU MAY ACCIDENTALLY SUBMIT YOUR EXAM. USE THE SPACE BAR INSTEAD.
In this pаrt, yоu will write the implementаtiоn оf the method below. Your implementаtion should be consistent with the class you've written in a prior step (i.e. only use the field(s) and method(s) that exist in the MyAppointmentScheduler class). You do not need to include any import statements or Javadoc comments in your response. int indexOf(T appointment) Returns the index of the appointment in the system that is equal to the appointment passed in. Returns -1 if no appointment in the system is equal to the appointment passed in. HINT: it's strongly recommended this method is implemented before schedule(T, int) and cancel(T) methods Make sure to select the 'Preformatted' style from the dropdown so your code is formatted clearly. DO NOT USE THE TAB KEY WHEN WRITING CODE AS YOU MAY ACCIDENTALLY SUBMIT YOUR EXAM. USE THE SPACE BAR INSTEAD.
In this pаrt, yоu will write the implementаtiоn оf the method below. Your implementаtion should be consistent with the class you've written in a prior step (i.e., only use the field(s) and method(s) that exist in the MyAppointmentScheduler class). You do not need to include any import statements or Javadoc comments in your response. T cancel(T appointment) throws IllegalArgumentException, NoSuchElementException Removes and returns the appointment in the system that is equal to the appointment passed in. Remaining appointments should be shifted towards the beginning of the system. This method MUST use the cancel(int index) method to perform the removal! HINT: the implementation of this method is simple if you've implemented the cancel(int) and indexOf(T) methods. Think about how you can use these two methods to find and remove an appointment that is equal to the argument (and throw the required exceptions, if necessary). You can also rely on the propagation of exceptions, where appropriate. method throws IllegalArgumentException when the argument is null. The message should contain text describing the reason the argument is illegal. You may assume that IllegalArgumentException is an unchecked exception and has a constructor that takes in a single String parameter representing the message. method throws NoSuchElementException when an appointment equal to the argument doesn't exist within the system. You may assume that NoSuchElementException is an unchecked exception and has a constructor that takes in a single String parameter representing the message. Make sure to select the 'Preformatted' style from the dropdown so your code is formatted clearly. DO NOT USE THE TAB KEY WHEN WRITING CODE AS YOU MAY ACCIDENTALLY SUBMIT YOUR EXAM. USE THE SPACE BAR INSTEAD.
Fоr this prоblem, yоu will be writing а clаss nаmed MyAppointmentScheduler that provides an implementation of the interface below. Only write the methods asked of you and/or required by the interfaces -- DO NOT write helper methods as they aren't necessary and will NOT be graded. Make sure that you are not using any raw types (i.e., you must use the generic type parameter in your solution). You do not need to include any import statements or Javadoc comments in your response. And, of course, assume the interface below compiles. /* T is bounded to be a type that * already implements compareTo(T) * * AppointmentScheduler includes the methods * of the Iterable interface for type T */public interface AppointmentScheduler extends Iterable { int appointmentCount(); void clear(); boolean isEmpty(); int indexOf(T appointment); int insertionPoint(T appointment); void schedule(T appointment, int index) throws IndexOutOfBoundsException, IllegalArgumentException; void schedule(T appointment) throws IllegalArgumentException; T cancel(int index) throws IndexOutOfBoundsException; T cancel(T appointment) throws IllegalArgumentException, NoSuchElementException;} It's recommended that you read ALL of the following requirements before implementing (there are HINTS). It's strongly recommended that you implement the methods in the order in which they are detailed below to maximize code reuse and make the best use of your time. The MyAppointmentScheduler class must have ONE private array that is used to store the appointments of the system in ascending (i.e., least-to-greatest) order. This class must also have a single, no-argument constructor that creates the generic array of type T with an initial length of 10. No other constructors should be written. NOTE: For ease of implementation, you can assume that new T[length] is valid syntax for creating a new array of type T. You can earn 5 bonus points if you know the correct way to create a new array of a generic type that will compile in Java. The MyAppointmentScheduler class should also have a nested inner class named MyAppointmentSchedulerIterator that satisfies the requirements of the Iterator interface. The iterator should iterate over the appointments in the system in ascending (i,e, least-to-greatest) order. To make it easier to focus on each part of this implementation, you will be asked to implement different parts of this class across multiple questions. Detailed descriptions of the behaviors for the MyAppointmentScheduler methods are provided in those questions. Make sure to select the 'Preformatted' style from the dropdown so your code is formatted clearly. DO NOT USE THE TAB KEY WHEN WRITING CODE AS YOU MAY ACCIDENTALLY SUBMIT YOUR EXAM. USE THE SPACE BAR INSTEAD. Tentative estimated breakdown of the points for this question is as follows: ITEM POINTS appointmentCount, clear, & isEmpty methods 10% indexOf & insertionPoint methods (i.e., helpers) 15% schedule methods 22.5% cancel methods 22.5% MyAppointmentScheduler class (misc.) 10% MyAppointmentSchedulerIterator class (misc.) 20%
In this pаrt, yоu will write the implementаtiоn оf the method below. Your implementаtion should be consistent with the class you've written in a prior step (i.e. only use the field(s) and method(s) that exist in the MyBookingScheduler class). You do not need to include any import statements or Javadoc comments in your response. int indexOf(T booking) Returns the index of the booking in the system that is equal to the booking passed in. Returns -1 if no booking in the system is equal to the booking passed in. HINT: it's strongly recommended this method is implemented before schedule(T, int) and cancel(T) methods Make sure to select the 'Preformatted' style from the dropdown so your code is formatted clearly. DO NOT USE THE TAB KEY WHEN WRITING CODE AS YOU MAY ACCIDENTALLY SUBMIT YOUR EXAM. USE THE SPACE BAR INSTEAD.
In this pаrt, yоu will write the implementаtiоn оf the method below. Your implementаtion should be consistent with the class you've written in a prior step (i.e., only use the field(s) and method(s) that exist in the MyBookingScheduler class). You do not need to include any import statements or Javadoc comments in your response. void schedule(T booking) throws IllegalArgumentException Adds a booking into the system while maintaining the ordering. This method MUST use the schedule(T, int) method to perform the insertion! HINT: the implementation of this method is nearly trivial if you've implemented the cancel(T, int) and insertionPoint(T) methods! method has the same requirements as the schedule(T, int) method Make sure to select the 'Preformatted' style from the dropdown so your code is formatted clearly. DO NOT USE THE TAB KEY WHEN WRITING CODE AS YOU MAY ACCIDENTALLY SUBMIT YOUR EXAM. USE THE SPACE BAR INSTEAD.
In this pаrt, yоu will write the implementаtiоn оf the method below. Your implementаtion should be consistent with the class you've written in a prior step (i.e., only use the field(s) and method(s) that exist in the MyBookingScheduler class). You do not need to include any import statements or Javadoc comments in your response. void schedule(T booking, int index) throws IndexOutOfBoundsException, IllegalArgumentException Adds a booking at the specified position in the system, where index 0 represents the first position in the system (i.e., position of first booking returned during iteration). Remaining bookings should be shifted towards the end of the system, starting with the booking currently in that position. NOTE: It's intentional that this method can put the system into a state where it is no longer ordered. This method isn't intended to be used outside of the MyBookingScheduler class. If the underlying array is full when a booking is inserted into the system at a valid index, it must first be increased in length using the following method which you can assume exists: MyArrayUtils.doubleLength(T[] arr); This method returns a T[] that contains a copy of the elements of the T[] arr that is passed in. The returned array will have double the length of the array that was passed in. method throws an IndexOutOfBoundsException when the index is invalid. The message should contain a description of the specific reason the index is invalid. An index is invalid if: the value of the index is negative the value of the index exceeds the size of the system. NOTE: an index that points to the next immediately available slot is VALID (i.e., inserting at an index equal to the booking count is a valid operation) You may assume that IndexOutOfBoundsException is an unchecked exception and has a constructor that takes in a single String parameter representing the message. method throws an IllegalArgumentException when the reference passed in for the booking is null. The message should contain text describing the specific reason the argument is illegal. You may assume that IllegalArgumentException is an unchecked exception and has a constructor that takes in a single String parameter representing the message. HINT: it is strongly recommended this method is implemented before the schedule(T) method Make sure to select the 'Preformatted' style from the dropdown so your code is formatted clearly. DO NOT USE THE TAB KEY WHEN WRITING CODE AS YOU MAY ACCIDENTALLY SUBMIT YOUR EXAM. USE THE SPACE BAR INSTEAD.
In this pаrt, yоu will write the implementаtiоn оf the method below. Your implementаtion should be consistent with the class you've written in a prior step (i.e. only use the field(s) and method(s) that exist in the MyBookingScheduler class). You do not need to include any import statements or Javadoc comments in your response. T cancel(int index) throws IndexOutOfBoundsException Removes and returns the booking at the specified position in the system, where index 0 represents the first position in the system (i.e., position of first booking returned during iteration). Remaining bookings should be shifted towards the beginning of the system. method throws an IndexOutOfBoundsException when the index is invalid. The message should contain a description of the specific reason the index is invalid. An index is invalid if: the value of the index is negative the value of the index does not point to a booking that exists within the system. NOTE: an index that points to the last booking is VALID You may assume that IndexOutOfBoundsException is an unchecked exception and has a constructor that takes in a single String parameter representing the message. HINT: it's strongly recommended this method is implemented before the checkOut(T) method. Make sure to select the 'Preformatted' style from the dropdown so your code is formatted clearly. DO NOT USE THE TAB KEY WHEN WRITING CODE AS YOU MAY ACCIDENTALLY SUBMIT YOUR EXAM. USE THE SPACE BAR INSTEAD.
Fоr this prоblem, yоu will be writing а clаss nаmed MyBookingScheduler that provides an implementation of the interface below. Only write the methods asked of you and/or required by the interfaces -- DO NOT write helper methods as they aren't necessary and will NOT be graded. Make sure that you are not using any raw types (i.e., you must use the generic type parameter in your solution). You do not need to include any import statements or Javadoc comments in your response. And, of course, assume the interface below compiles. /* T is bounded to be a type that * already implements compareTo(T) * * BookingScheduler includes the methods * of the Iterable interface for type T */public interface BookingScheduler extends Iterable { int bookingCount(); void clear(); boolean isEmpty(); int indexOf(T booking); int insertionPoint(T booking); void schedule(T booking, int index) throws IndexOutOfBoundsException, IllegalArgumentException; void schedule(T booking) throws IllegalArgumentException; T cancel(int index) throws IndexOutOfBoundsException; T cancel(T booking) throws IllegalArgumentException, NoSuchElementException;} It's recommended that you read ALL of the following requirements before implementing (there are HINTS). It's strongly recommended that you implement the methods in the order in which they are detailed below to maximize code reuse and make the best use of your time. The MyBookingScheduler class must have ONE private array that is used to store the bookings of the system in ascending (i.e., least-to-greatest) order. This class must also have a single, no-argument constructor that creates the generic array of type T with an initial length of 10. No other constructors should be written. NOTE: For ease of implementation, you can assume that new T[length] is valid syntax for creating a new array of type T. You can earn 5 bonus points if you know the correct way to create a new array of a generic type that will compile in Java. The MyBookingScheduler class should also have a nested inner class named MyBookingSchedulerIterator that satisfies the requirements of the Iterator interface. The iterator should iterate over the bookings in the system in ascending (i,e, least-to-greatest) order. To make it easier to focus on each part of this implementation, you will be asked to implement different parts of this class across multiple questions. Detailed descriptions of the behaviors for the MyBookingScheduler methods are provided in those questions. Make sure to select the 'Preformatted' style from the dropdown so your code is formatted clearly. DO NOT USE THE TAB KEY WHEN WRITING CODE AS YOU MAY ACCIDENTALLY SUBMIT YOUR EXAM. USE THE SPACE BAR INSTEAD. Tentative estimated breakdown of the points for this question is as follows: ITEM POINTS bookingCount, clear, & isEmpty methods 10% indexOf & insertionPoint methods (i.e., helpers) 15% schedule methods 22.5% cancel methods 22.5% MyBookingScheduler class (misc.) 10% MyBookingSchedulerIterator class (misc.) 20%