Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

A.

Towers of hanai (20)


The objective of the puzzle is to move the entire stack to another rod,
obeying the following simple rules:
1. Only one disk can be moved at a time.
2. Each move consists of taking the upper disk from one of the stacks and
placing it on top of another stack i.e. a disk can only be moved if it is
the uppermost disk on a stack.
3. No disk may be placed on top of a smaller disk.
Using applet draw the towers and disks, use any event handling
mechanism to move the disks.

B. Using menus and with all required controls design classifieds site
and display appropriate information( as labels/ dialog box) when an
menu item been clicked. (20)
Buy
 Apparel & Accessories
 Bicycles
 Books & Magazines
Sell
 Business & Office Products
 Cameras
 CDs & DVDs
New Cars
 By Brand
o Maruti
o Hyundai
o Tata

 By Segment
o Small Cars
o Luxury Cars
o Midsize Cars

C. Write a java program which shows a pair of dice. When the mouse
been pressed on the applet, the dice to be rolled (the dice should be
assigned newly computed random values). A die should be drawn as a
square showing from 1 to 6 dots. (20)

D. i. Write java code to create a frame with the following menus such that
the corresponding geometric object is created when a menu is clicked.
(10)
1. Circle 2. Rectangle 3. Line 4. Diagonal for the
rectangle.

ii. Write a program to simulate the working of a basic calculator( use


the required layout and event handling ) (10)

E. i. Write java code to Rotate a compass needle on the screen about a


fixed point in response to the mouse being moved around the screen.
(10)
ii. write java code to draw a car and make it to move using applet and
event handling. (10)

F. Online Examination ( for java language)


In this project, there are given 5 questions to play. Use java array to store
the questions, options and answers and display the result.
Use the required controls, layout and use any event handling mechanism to
implement the same

Write a Java program to plot thepath of a small circle moving around the
circumference of a larger circle.

http://gamedev.stackexchange.com/questions/31218/how-to-move-an-
object-along-a-circumference-of-another-object

You might also like