1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
svet-max [94.6K]
3 years ago
5

Create a class called ClockNode which has fields for the data (a Clock) and next (ClockNode) instance variables. Include a one-a

rgument constructor which takes a Clock as a parameter. (For hints, see the PowerPoint on "Static vs. Dynamic Structures".)
public ClockNode (Clock c) { . . }
The instance variables should have protected access. There will not be any get and set methods for the two instance variables.

Create an abstract linked list class called ClockList. This should be a linked list with head node as described in lecture. Modify it so that the data type in the nodes is Clock. The no-argument constructor should create an empty list with first and last pointing to an empty head node, and length equal to zero. Include an append method in this class.

Create two more linked list classes that extend the abstract class ClockList: One called UnsortedClockList and one called SortedClockList, each with appropriate no-argument constructors. Each of these classes should have a method called add(Clock) that will add a new node to the list. In the case of the UnsortedClockList it will add it to the end of the list by calling the append method in the super class. In the case of the SortedClockList it will insert the node in the proper position to keep the list sorted.

Instantiate two linked lists, and for every Clock read from the file, add it to the unsorted and sorted lists using the add method. You will end up with the first list having the Clocks from the input file in the order they were read, and in the second list the Clocks will be in sorted order. Display the unsorted and sorted Clocks in the GUI just as in project 1.

Submitting the Project.

You should now have the following files to submit for this project:

Project2.java
Clock.java
ClockGUI.java
ClockNode.java
ClockList.java
UnsortedClockList.java
SortedClockList.java
Submit a jar file.

Rather than upload all the files above separately, we will use Java’s facility to create the equivalent of a zip file that is known as a Java ARchive file, or "jar" file.

Instructions on how to create a jar file using Eclipse are on Blackboard. Create a jar file called Project2.jar and submit that. Be sure the jar file contains source code, not classes.

2:25:24
1:30:00
13:30:00
15:28:39
5:15:45
2:30
2:30:59
29:30:59
2
8:15:12
6:56:34
6:64:34
9:25:00
7:45:42
27:80:75
11:10:00
2:45:00
23:24:25
23:00:00

Add a file menu to your ClockGUI with options to open any file for reading (and displaying the file as in Project 2), and one to Quit the program. You will need a FileMenuHandler class to handle the events from the FileMenu. Be sure to use getAbsolutePath() when getting the file from the JFileChooser, not getName().

Handle Exceptions

A data file will be provided that will contain errors (e.g., hours > 23, minutes > 59, seconds > 59). Create and exception called IllegalClockException (by extending IlegalArgumentException as shown in lecture) and have the constructor of the Clock throw it. Use a try/catch statement to catch this exception in your program, and print the erroneous clock to the console (do not add it to the linked lists).

Create a jar file called Project3.jar and submit that to Blackboard by the due date for full credit.
Computers and Technology
1 answer:
zimovet [89]3 years ago
4 0
Idk ....................
You might be interested in
Create two algorithms for an everyday problem such as computing sales tax or figuring out the number of tables to seat guests. T
tamaranim1 [39]

Answer:

b

Explanation:

3 0
3 years ago
On the Loan worksheet in cell c9 enter PMT function to calculate the monthly payment for the Altamonte springs 2018 facilities l
Delicious77 [7]

Answer and Explanation:

First of all we should have to know about PMT

PMT

stands for payment .payment that you want to send and receive.It is used in financial calculators and equation. It is a payment that return the periodic payment for a loan.

From the given statement we have to calculate the PMT  for this purpose .

let us consider example where we take loan amount and have some interest and then calculate it.

loan of amount = $6000.00

Interest rate = 4.20%

period per year=15

period = 60

then monthly payment = $ 111.40

Using Excel then we get the monthly payment in cell C9

as calculations has been shown in the excel.

where you can get function who returns a positive value.

6 0
3 years ago
What statement best describes operating systems?
GenaCL600 [577]

Answer:

An operating system, or "OS," is software that communicates with the hardware and allows other programs to run

3 0
3 years ago
One acre of land is equivalent to 43,560 square feet. Write a program that asks the user to enter the total square feet in a tra
lana [24]

Answer:

Explanation:

Using Python programming language:

def get_number_acres(square_feet):

   return square_feet / 43560

sq_feet = input('Enter the number of square feets >>> ')

number_acres = get_number_acres(sq_feet)

7 0
3 years ago
_____ of a global information system (GIS) concentrates on medium-range activities that move an organization toward achieving lo
Dafna11 [192]

Answer: (A) Tactical support

Explanation:

 GIS is the global information system in which the data is delivered worldwide in the form of information system. The global information system achieve long term goals in an organization.

  • The tactical support is used in the global information system for concentrating the activities on the medium range in an organization.  
  • The tactical support is one of the effective way to producing the desirable result and also achieve the main strategic objective.

Therefore, Option (A) is correct.

8 0
3 years ago
Other questions:
  • 5255555555555+55555555555555/1111*99442
    14·2 answers
  • Implement function translate() that provides a rudimentary translation service. The function input is a dictionary mapping words
    9·1 answer
  • Amelia has selected the chart in her PowerPoint and needs to change the chart type. Which one of the Chart Tools tabs would she
    15·1 answer
  • You are connected to a server on the Internet and you click a link on the server and receive a time-out message. What layer coul
    12·1 answer
  • Which is the biggest known issue specific to satellite Internet connections?
    13·2 answers
  • ith reference to McCall's quality modle , what are the three important aspects of a software product ?
    7·1 answer
  • Adding videos to your website can be tricky because there may be problems making sure they will play in all
    13·1 answer
  • Que quiere decir analogico
    6·1 answer
  • What is the default view when you first open a PowerPoint presentation
    10·1 answer
  • PLEASE HELP
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!