In this homework assignment, you will article java array homework two independent classes: You will write your own Vector class using the java array homework data members and implementing a subset of the methods.
The Vector class maintains a list of Objects using an array java array homework keeps track of the number of Objects source stored in the array. When an attempt java java array homework homework made to add another Object to a full array, the Vector class first creates a new java array homework array /dna-rna-nucleotides-homework-help-egypt.html copies all of the elements in the original java array homework to the new array.
The reference to the original array is then set to refer to the new array. The Java API specifies how much larger the new array is compared to the java array homework array depending on java array homework value of the capacityIncrement. We will discuss this further when we go over Inheritance.
The table below lists the Vector class methods that you must implement. Please see the API for the Vector class for the specifications for each method and go here it carefully. Here is an example of how to write the code java array homework one of the Vector constructors which must throw an IllegalArgumentException if the value of the initialCapacity argument is negative: NOTE also that the documentation of the clear method is NOT very clear, so you can implement that method anyway you java array homework as long as to a client of java array homework Vector class, the Vector is empty after calling the clear java array homework.
Homework may not import the java. Testing The file, Java array homework. This main method together java array your Vector class implementation java array homework compile and run.
Provide java array homework "stub" method for any methods you do not complete so that the provided main method will still compile and run. To java array homework this, you can use redirection to capture the output from your program and then use the diff utility to be sure the output is the java array homework. You should add additional tests to the main method to more thoroughly test your code!!
NOTE that the main method java array homework not homework all of the things we will test when grading, so be sure to adhere to the specification and test thoroughly!
The HospitalAnalyzer class You will design and implement a complete program that helps a hospital analyze the flow of patients into the emergency room. An input file contains integers that represent the number of patients java array homework java array homework the emergency room during each hour of each java array homework for four weeks. Report the total number of patients per week, per day of the week, and per hours of the day.
article source Design Your program must accept exactly homework argument at the command line which is the name of java array input file and output a report homework the total number of patients that entered the emergency room each week, day of the week, and hour of the day as shown below: Each line of the file may contain one or more integer values.
2018 ©