0% found this document useful (0 votes)
2 views2 pages

Java 30

The document outlines a practical assignment for developing a Java applet program that implements various geometric shapes including a cylinder, cube, square inside a circle, circle inside a square, and a polygon. It includes the code for drawing these shapes using the Graphics class in Java. The assignment is submitted by a student named Abhay Manik Uchit with roll number 56.

Uploaded by

permanchannel
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Java 30

The document outlines a practical assignment for developing a Java applet program that implements various geometric shapes including a cylinder, cube, square inside a circle, circle inside a square, and a polygon. It includes the code for drawing these shapes using the Graphics class in Java. The assignment is submitted by a student named Abhay Manik Uchit with roll number 56.

Uploaded by

permanchannel
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Practical No.

:30
Practical Name : Develop a program for implement shapes on applet like
cone,cylinders,cube,square inside a circle,circle inside a square.

Roll No. : 56

Student Name: Abhay Manik Uchit

Program: import
[Link].*; import
[Link].*;
public class Shapes extends Applet
{
public void paint(Graphics g)
{
/*Cylinder*/
[Link]("(a).Cylinder",10,110);
[Link](10,10,50,10);
[Link](10,80,50,10)
;
[Link](10,15,10,85);
[Link](60,15,60,85);
/*Cube*/
[Link]("(b).Cube",95,110);
[Link](80,10,50,50);
[Link](95,25,50,50);
[Link](80,10,95,25);
[Link](130,10,145,25);
[Link](80,60,95,75);
[Link](130,60,145,75);
/*Squar Inside A Circle*/
[Link]("(c).Squar Inside A Circle",150,110);
[Link](180,10,80,80);
[Link](192,22,55,55);
/*Circle Inside a Squar*/
[Link]("(d).Circle Inside a Squar",290,110);
[Link](290,10,80,80);
[Link](290,10,80,80);
/*Polygon*/
[Link]("(e).Polygon",90,250)
; int a[]={200,400,200,400}; int
b[]={200,500,500,200};
[Link](a,b,4);

}
}
/*
<html>
<applet code="[Link]" width="200" height="200">
</applet>
</html>
*/

Output :

You might also like