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

  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.

  Write a class array that encapsulates an array

Write a class Array that encapsulates an array and provides bounds-checked access. The private instance variables should be int index and inarray[10]. The public members should be a default constructor and methods (signatures shown below) to provide ..

  Write java program to reads ten values from user

Write the java program which reads 10 values from user and store them in 1 daimantion array. your program will ask the user wich operation he wants to perform:

  Write program in java-calculate and display mortgage payment

Write the program in Java (with a graphical user interface) and have it calculate and display the mortgage payment amount from user input of the amount of the mortgage.

  Implementation activities of software development

Analysis, design, and implementation activities of software development

  Java program to print strings given at command line

Write down program Average.java to print strings which it is given at command line, one per line. If nothing is given at command line, then print "No arguments".

  Write a program that assigns seats on an airplane

Prepare a program that teaches arithmetic to a young child. The program tests subtraction and addition. Write a program that assigns seats on an airplane.

  Create java application which creates random phone number

Create and implement Java application which creates and prints a random phone number of the form xxx-xxx-xxxx. Include the dashes in the output.

  Simulate a simple multiuser computer system

Prepare a java program to simulate a simple multiuser computer system

  Insert uml design diagrams, use case, classes

Insert UML design diagrams here (use case, class, and sequence diagram).

  Write program in java to calculate interest

Write a program in java to do the following : the following data is stored for each customer in the bank: account number,average balance and number of transaction for each customer it is required to calculate the interest earn

  Cascading style sheet to a website

Compare and contrast the process of adding JavaScript and a Cascading Style Sheet to a Website. Determine if they can be used simultaneously in a page.

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