CST242 Project 11: Chapter 23
Concurrency Apps
-
Start a new project named "project-11" and select one of the following
exercises:
-
For a maximum of 7 out of 10 (ten) points
equivalent of "Concurrency1.java" as a Java console application
in which the task is to calculate the area of a circle given the radius before the task
is put to sleep (the radius of a circle should be assigned the same random value in seconds
as the sleep time, e.g. if the sleep time is 3500 milliseconds, the radius is 3.5 seconds);
display the radius and the area for each circle when the task comes out of sleep;
instantiate and run at least three tasks
-
For a maximum of 8 out of 10 (ten) points,
equivalent of "Concurrency1.java as a Java console application where
the application involves an additional class file (e.g. a class file name "GrossPay.java"
with instance variable "hoursWorked" and "payRate"), within the
run
method
of the task instantiate an object from that class before putting the task to sleep and
then call the object's toString
method to display its output (e.g. for
"GrossPay.java" includes "hoursWorked," "payRate" and "grossPay" with overtime) after
the task comes out of sleep; instantiate and run at least three tasks; the UML for the
"GrossPay" class is as follows:
-
For a maximum of 9 out of 10 (ten) points
equivalent of "Concurrency3.java" as a JavaFX application in which
you develop your own "long-running" computation
"Padovan Sequence"
and an additional computation also based on the "Padovan Sequence" that calculates the next
value in the sequence at each
Button
click while the first task is running
continuously in the background; the sequence is as follows:
- P(0) = P(1) = P(2) = 1
- After that: P(n) = P(n-2) + P(n-3)
-
For a maximum credit of 10 out of 10 (ten) points
equivalent of "Concurrency4.java" as a JavaFX application in which
the task is to find all the "numeric palindromes" from one (1) up to the number input
by the user returning continual output to a
ListView
control including
update to a ProgressBar
; include a second Button
so that the
task can be canceled at any time; sample output for user input up to 1000 would be:
1
2
3
4
...
9
11
22
33
...
99
101
111
121
...
999
-
Provide full documentation using the Javadoc standard and based upon the
downloaded sample files for the unit
-
Students may work on all projects in teams of two or three,
and, if so, all students in the group must submit the same project to their own dropboxes
in Brightspace. In the text box's dropbox, as well as in the source code documentation
(comments), state the name(s) of the classmate(s) with whom you worked.
-
When all steps are finished, create a .ZIP archive (not a .RAR)
of the entire project. This completed assignment with a copy of all files from the
NetBeans project submitted electronically via an attachment to a
Brightspace
dropbox is due to Prof. Struck by 11:59 p.m. on the date specified in the course outline.