Question: Instructions Please submit your codes for the 4 exercises from chapters 6 , 7 and 8 . You are advised to have the codes completed

Instructions
Please submit your codes for the 4 exercises from chapters 6,7 and 8.
You are advised to have the codes completed on Eclipse and have your .java files ready.
The link once opened will remain available for up to 2 hours. You can submit your code up to 2 times.
(Game of Craps):
You roll two dice. Each die has six faces, which contain one, two, three, four, five and six spots, respectively.
After the dice have come to rest, the sum of the spots on the two upward faces is calculated.
If the sum is 7 or 11 on the first throw, you win.
If the sum is 2,3 or 12 on the first throw (called "craps"), you lose (i.e., the "house" wins).
If the sum is 4,5,6,8,9 or 10 on the first throw, that sum becomes your "point."
To win, you must continue rolling the dice until you "make your point" (i.e., roll that same point value).
You lose by rolling a 7 before making your point.
(Using Array in Dice Rolling) Rolling a six-sided Die 60,000,000 times.
Using Arrays to implement and output frequency for each face as below
(Using the enhanced for statement) Write an application that uses an enhanced for statement to sum the double values passed by the command-line argumnets.
[Hint: Use the static method parseDouble of class Double to convert a String to a double value]
(Enum Type) Write an enum type TrafficLight, whose constants (RED, GREEN, YELLOW) take one parameter - the duration of the light.
Write a program to test the TrafficeLight enum so that it displays the enum constants and their durations.
Instructions Please submit your codes for the 4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!