Questions1 design and implement an applet called circles

Assignment Help JAVA Programming
Reference no: EM13370853

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: EM13370853

Questions Cloud

David jones the new administrator for a surgical clinic was : david jones the new administrator for a surgical clinic was trying to evaluate how to allocate his indirect expenses.
On 2nd january 2013 mize co issued at par 300000 of 9 : on 2nd january 2013 mize co. issued at par 300000 of 9 convertible bnds. each 1000 bond is convertible into 60 shares.
Premier bank and trust is giving alou company a loan before : premier bank and trust is giving alou company a loan. before doing so management decides that added discussions with
Develop a cure for cancer hypothetically speaking of : develop a cure for cancer. hypothetically speaking of course as many tumor biologists may argue that a single cure is
Questions1 design and implement an applet called circles : questions1. design and implement an applet called circles that draws 50 circles of random diameter in random locations.
Taska research strategy is a plan of action that gives : taska research strategy is a plan of action that gives direction to your efforts enabling you to conduct your research
Business correspondencethis task consists of the following : business correspondencethis task consists of the following business documents1.letter of claim scrap2.job application
Objectives understanding planning stage of the audit : objectives understanding planning stage of the audit process review of client business and perform audit risk
Question 1 discussion amp backgroundtaking all nippon : question 1 discussion amp backgroundtaking all nippon airways ana as a successful example the company is acknowledged

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write complete java program to read from keyboard

Write complete Java program to read, from keyboard, a student's first and last name and six grades. It will display on screen last name then first letter of first name with a period.

  Test plan for both unit testing and integration testing

Do a test plan for both unit testing and integration testing, justification why you need this test creating the test case for each individual test must use java language in netbeans IDE to perform each test, screen capture one example to run the ..

  Alter the prototype form page by javascript function

Alter the prototype form page so that when JavaScript function has verified that all the required fields have been filled, cookie is added to user's computer.

  Create a class for services offered by a hair-styling salon

Create a class for services offered by a hair-styling salon. Data fields include a String to hold the service description and write an application named Salon Report that contains an array to hold six Service objects and fill it with the data

  Design an application for pizza order process

Create an application to take and procedure a pizza order. The user should be able to make pizza order choices from listboxes, and the application should show the order price.

  Java code using jframe

Write a Java code using JFrame. This code needs to manipulate 4 shapes(2 rectangles and 2 squares) in a 400x400 JFrame. This needs to manipulate the shapes in 3 different ways, using 3 different methods. One for translating a shape, one for proportio..

  What are some debugging techniques for javascript

What are some common programming errors? How can they be prevented? What is the try catch structure, how is it useful? What are some debugging techniques for JavaScript?

  Create a project using the classes in the doc sharing area

create a project using the classes in the Doc Sharing area labeled A Simple LinkedList class. Compile it, run it, and review the code that is given carefully. This code tests the LinkedList class provided in the lecture.

  In this assignment you will be asked to implement a card

in this assignment you will be asked to implement a card game. you will need to make several design decisions for your

  Java program ask user to enter 10-character telephone number

Write a Java program that asks the user to enter a 10-character telephone number in the format XXX-XXX-XXXX. The program should display the telephone number with any alphabetic characters

  What is the average response time for this system?

A web server receives a request every 50ms and processes web requests every 8 ms. Using queuing theory, 1. What is the average response time for this system?

  Program that uses random instead of scanner to play

Write a Java Program that uses Random instead of Scanner to play many rounds of Rock Paper Scissors. The user and computer will each randomly pick one and common rules of winning apply

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