" Flag Using Applet": Amrutvahini Polytechnic, Sangamner
" Flag Using Applet": Amrutvahini Polytechnic, Sangamner
Submitted to
Amrutvahini Polytechnic, Sangamner
Department: - Computer Department
In Partial Fulfilment of the Requirement for the Diploma In
Information Technology Submitted
By
CERTIFICATE
2021-2022.
Prof. Wakchaure Mam Prof. Kale G.B.
(Project Guide) (H.O.D.)
Annexure – II
Management System
1.0 Rationale : Java is platform independent, open-source object oriented programming language
enriched with free and open source libraries. In current industrial scenario Java has the broad industry
support and is prerequisite with many allied technologies like Advanced Java, Java Server Pages, and
Android Application Development. Thus, current industrial trends necessitate acquiring Java
knowledge for Computer Engineering and Information Technology graduates. This course develops
necessary skills in students to apply object oriented programming techniques in Java so that students
will be able to develop complete applications using core Java.
.
2.0 Aims/Benefits of the Micro-project :
The Micro-Project aims to:
1. Acquire the aim of generating a Flag by considering various colors and shapes.
2. To learn and implement the concept of applet and graphics
3.0 Course Outcomes Achieved :
a. Implement 3 Programs using object oriented methodology and basic of java.
b. Apply 3 concept of inheritance for code reusability.
c. Implement 3 programs using multithreading and Exception Handling.
d. Execute 3 programs using graphics and applet.
e. Use 3 concept of file handling I/O and file streams.
Import java.applet.*;
Import java.awt.*;
Public class Republic_flag extends Applet {
Public void paint(Graphics fl){
Color c1=new Color(255,140,0); //saffron color
Color c2=new Color(139,0,0); // dark red color
//for pole
Fl.setColor(c2);
Fl.fillRect(250,100,5,400);
Fl.setColor(Color.black);
Fl.drawRect(250,100,5,400);
//for saffron
Fl.setColor(c1);
Fl.fillRect(255,102,180,40);
Fl.setColor(Color.black);
Fl.drawRect(255,102,180,40);
//for white
Fl.setColor(Color.WHITE);
Fl.fillRect(255,142,180,40);
Fl.setColor(Color.black);
Fl.drawRect(255,142,180,40);
//for green
Fl.setColor(Color.GREEN);
Fl.fillRect(255,182,180,40);
Fl.setColor(Color.black);
Fl.drawRect(255,182,180,40);
// for stairs
Int j[]={
250,245,245,225,225,280,280,260,260,255
};
Int k[]={
500,500,505,505,515,515,505,505,500,500
};
Fl.setColor(c2);
Fl.fillPolygon(j,k,10);
Fl.setColor(Color.BLACK);
Fl.drawPolygon(j,k,10);
// for ashok chakra
//fl.setColor(Color.blue);
Fl.drawOval(325,142,39,39);
// for lines in ashok chakra
Int n1=345;
Int d1=162;
Double n2,d2;
Double angle= 0.0; //for angle determination
Double line=0.0;
Int r=20;
For(int i=1;i<=24;i++)
{
Angle=(double)line*(3.14/180);
N2=n1+(double)r*Math.cos(angle); d2=d1+(double)r*Math.sin(angle);
Fl.drawLine(n1,d1,(int)n2,(int)d2); //drawing line between (n1,d1) and (n2,d2)
Line=line+(360/24);
}
}
}
/*
<applet code=”Republic_flag.class” width=”700” height=”700”>
</applet>
*/
Windows 10