Skip to content

Xresolver/JAVA_Exercises

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JAVA_Exercises

0300-Simple_Addition:
Using JOptionPane class, add two numbers and show.

0400-Draw_Panel_Examples:
Using JPanel,JFrame and Graphics class, show 4 differents panels design by using drawLine method from Graphics.
This also include JButton object with actionListener interface.

0431-Decimal_Equivalent_Binary_Number:
This program get binary number from user, then calculate and show its decimal equivalent.

0500-Concentric_Circles:
Using JPanel, JFrame and Graphics classes, draw 12 concentric circles in the center of a JPanel,
the innermost circle have 10 pixel radius, every circle's radius 10 pixel bigger than another.

0516-Bar_Chart_With_Rectangles:
Using JPanel, JFrame, JOptionPane, Graphics, Color classes, show input dialogs for getting 5 integer data from user
and draw 5 charts in a JPanel by using drawRect method from graphics and fill them different colors using Color class.

0521-Pythagorean_Triples:
This Program find and show pythagorean triples that length of sides are less than or equal to 500

0525-Diamond_Print:
This program print a diamond of asterisks which have length user want.

0600-Bull’s_Eye:
Using method fillOval , draw a bull’s-eye that alternates between two random colors

0600-Random_Filled_Shapes:
Draws 10 random filled shapes in random colors, positions and sizes

0627-Greatest_Common_Divisor:
Reads two values from the user, calculate GCD of these numbers and display result.
This program use Euclid's Alorithm

0700-Drawing_Spirals:
Draws spirals with methods drawLine and drawArc

0722-Knight's_Tour:
Can the knight piece move around an empty chess-board and touch each of the 64 squares once and only once?
We study this intriguing problem with different approaches.

1000-Drawing_With_Polymorphism:
Create a set of shape classes that store information about each shape by using polymorphic behavior.
Class DrawPanel , which will generate random objects of class MyLine, MyOval and MyRectangle.
Class TestDraw in test package sets up a new window to display our drawings.