subject

Sorting an Array of Clocks Displaying in a GUI/Creating a Class Create a class called Clock to represent a Clock. It should have three private instance variables: An int for the hours, an int for the minutes, and an int for the seconds. The class should include a three- argument constructor and get and set methods for each instance variable. Override the method to String which should return the Clock information in the same format as the input file (See below). Read the information about a Clock from a file that will be given to you on Blackboard, parse out the three pieces of information for the Clock using a StringTokenizer, instantiate the Clock and store the Clock object in two different arrays (one of these arrays will be sorted in a later step). Once the file has been read and the arrays have been filled, sort one of the arrays by hours using Selection Sort. Display the contents of the arrays in a GUI that has a GridLayout with one row and two columns. The left column should display the Clocks in the order read from the file, and the right column should display the Clocks in sorted order. The input file Each line of the input file will contain information about a Clock, with each piece of information separated by a colon. An example of the input file would be: 12:31:19 17:23:19 If the line of the file does not have exactly three tokens, do not put it in the arrays, print it to the console. Submitting the Project. You should have three files to submit for this project: Project1.java clockGUI. java clock. java Upload your project to Blackboard by the due date for full credit. Proper Javadoc is expected for the Clock class.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 20:00
What side length would you specify if you were required to create a regular hexagonal plate that was composed of 33 cm(squared) of sheet metal? dimension the side length to 0.1 cm
Answers: 2
question
Computers and Technology, 22.06.2019 20:10
Assume the existence of a bankaccount class. define a derived class, savingsaccount that contains two instance variables: the first a double, named interestrate, and the second an integer named interesttype. the value of the interesttype variable can be 1 for simple interest and 2 for compound interest. there is also a constructor that accepts two parameters: a double that is used to initialize the interestrate variable, and a string that you may assume will contain either "simple", or "compound", and which should be used to initialize the interesttype variable appropriately. there should also be a pair of functions getinterestrate and getinteresttype that return the values of the corresponding data members (as double and int respectively).
Answers: 2
question
Computers and Technology, 23.06.2019 06:00
How can a user delete a drawing object
Answers: 1
question
Computers and Technology, 23.06.2019 11:20
Http is the protocol that governs communications between web servers and web clients (i.e. browsers). part of the protocol includes a status code returned by the server to tell the browser the status of its most recent page request. some of the codes and their meanings are listed below: 200, ok (fulfilled)403, forbidden404, not found500, server errorgiven an int variable status, write a switch statement that prints out the appropriate label from the above list based on status.
Answers: 2
You know the right answer?
Sorting an Array of Clocks Displaying in a GUI/Creating a Class Create a class called Clock to repre...
Questions
question
Mathematics, 23.03.2020 06:58
question
Mathematics, 23.03.2020 06:58
question
Mathematics, 23.03.2020 06:59
question
English, 23.03.2020 07:00
question
Mathematics, 23.03.2020 07:00
Questions on the website: 13722361