Design and implement an applet called circles

Assignment Help JAVA Programming
Reference no: EM1377113

Questions:

1. Design and implement an applet called Circles that draws 50 circles of random diameter in random locations. If the diameter of a circle is less than a certain value, the circle is ?lled with the color yellow. If the diameter of a circle is greater than an another value, the circle is ?lled with the color green. Otherwise, the circle is drawn un?lled, in red. Ensure that in each case the entire circle appears in the visible area of the applet.

2. Write a class called SimpleSlot that simulates a simple slot machine in which three numbers between 0 and 9 are randomly selected and printed side by side. Print an appropriate statement if all three of the numbers are the same, or if any two of the numbers are the same. Continue playing until the user chooses to stop.

3. Design and implement an application that prints the verses of the song "The Twelve Days of Christmas", in which each verse adds one line. The verses of the song are:

On the 12th day of Christmas, my true love gave to me Twelve drummers drumming,
On the 11th day of Christmas, my true love gave to me Eleven pipers piping,
On the 10th day of Christmas, my true love gave to me Ten lords a leaping,
On the 9th day of Christmas, my true love gave to me Nine ladies dancing,
On the 8th day of Christmas, my true love gave to me Eight maids a milking,
On the 7th day of Christmas, my true love gave to me Seven swans a swimming,
On the 6th day of Christmas, my true love gave to me Six geese a laying,
On the 5th day of Christmas, my true love gave to me Five golden rings,
On the 4th day of Christmas, my true love gave to me Four calling birds,
On the 3rd day of Christmas, my true love gave to me Three French hens,
On the 2nd day of Christmas, my true love gave to me Two turtle doves, and
On the 1st day of Christmas, my true love gave to me A partridge in a pear tree.

Write a class called TwelveDays that prompts the user to enter the last day (from 1 to 12) and prints the relevant lines of the song from the ?rst to the last day. Use a switch statement in a loop to control which lines get printed. Use a separate switch statement to put the appropriate suffix on the day number (1st, 2nd, 3rd, etc.).

Reference no: EM1377113

Questions Cloud

Role of the compensable factors in the rating : Describe with examples how the knowledge or skill needs of a job drive the evaluation rating and also describe with example the role of the other compensable factors in the rating.
Summary of competition and explanation : Suppose that you and your two partners wish to start a firm that specializes in special occasion gift baskets for individual and corporate clients.
Characteristics of control system : Night Tran Construction Corporation specializes in making small power plants, mostly for utility firms. The firm was awarded a contract approximately two years ago to make such a power plant.
Cost of medical benefits : A firm discovers that the cost of its medical benefits has raised far beyond what was expected, and further increases are projected.
Design and implement an applet called circles : Design and implement an applet called Circles that draws 50 circles of random diameter in random locations. If the diameter of a circle is less than a certain value, the circle is ?lled with the color yellow.
Standardizing employee selection programs : Suppose you are the Sales Manager for Technocrat Gizmos, and your section is in desperate need of new Sales Associates. You post a job description in a local newspaper
Question about planning process : Kim Allred is relatively new as a caretaker, having been promoted only two months before and before her promotion, she had worked for the company for 7-years as a sales specialist in office equipment.
Prepare a research strategy : A research strategy is a plan of action that gives direction to your efforts enabling you to conduct your research systemically rather than haphazardly.
Determine the portion of time : Every hour, the ticket seller at local mall can serve an average of twelve consumers every hour, and an average of 10 consumers every hour arrive to buy tickets for the Grateful Dead concert.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Prepare a java simulation program

Given a hash function h, prepare a java simulation program to determine each of the subsequent quantities after 0.8*tablesize random keys have been generated. The keys should be random integers.

  Javascript validation - cgi program

CGI mailer script form-mail.pl to your server's cgi-bin directory, and change the permissions on the script to make it executable - BMIS 310

  Mean and standard deviation using using eclipse

Java programming to calculate Mean and standard deviation using Using Eclipse.

  Java class to accept a user-s hourly rate of pay

Write a class that accepts a user's hourly rate of pay and the number of hours worked. Display the user's gross pay, the withholding tax (15% of gross pay), and the net pay (gross pay - withholding).

  Implement the application using a singly linked list

Implement the following application using a singly linked list. This application accepts from console and stores a list of 10 names of your friends in the singly linked list

  List various bindings that are needed to determine semantics

List the various bindings that are required to determine the semantics when the statement is executed. For each binding, indicate the binding time used for the language.

  Dijikstra for undirected graph using simple scheme

Dijikstra for undirected graph using simple scheme with array and fibonacci heap and compare the performance/results, preferably in java.

  Write java program which will permit user to input data

Write the Java Program which will permit the user to input data. The data will be validated using a loop that requires the user to input the data until it is correct or in the correct range. T

  Using a linked implementation of graph write a method

Write a method that takes two nodes as input and returns true if joining an edge between these two nodes, forms a duplicate path to one of the input nodes within the graph.

  Write specifications for method which advances date by one

Write specifications for the method which advances any given date by one day. Comprise a statement of purpose, pre- and post-conditions, and description of parameters.

  Java threads

This is an introductory assignment on Java synchronization. You will use Java Threads while learning more about concurrency and achieving atomicity using Java’s inbuilt mechanisms.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd