Skip to main content

Write the output of the program.

Code:
importjava.applet.*;
importjava.awt.*;
/*
<applet code="Arcs" width=300 height=300>
</applet>
*/
public class Arcs extends Applet
{
public void paint(Graphics g)
{
g.drawArc(10,40,70,70,0,75);
g.fillArc(100,40,70,70,0,75);
g.drawArc(10,100,70,80,0,175);
g.fillArc(100,100,70,90,0,270);
g.drawArc(200,80,80,80,0,180);
}
}

OUTPUT:


Comments

Popular posts from this blog

Program to calculate the room area and volume to illustrate the concept of single inheritance.

CODE: class Roomarea   { protected double l, b; Roomarea(double len, double br) { l=len; b=br; } void putdata() { System.out.println("Area of Room: "+(l*b)); } } class Roomvol extends Roomarea   { double h; Roomvol(double len, double br, double he) { super(len, br); h=he;   } void putdata() { super.putdata(); System.out.println("Volume of Room: "+(l*b*h)); } } public class EXP18Q4 { public static void main(String[] args) { Roomvol r1 = new Roomvol(10, 20, 10); r1.putdata();   } }

Develop an applet for drawing a human face.

Code: import java.awt.*; importjava.applet.*; /* <applet code = "face" width = 300 height = 300></applet> */ public class face extends Applet {     public void paint(Graphics g)     { g.drawOval(40, 40, 120, 150); g.drawOval(57, 75, 30, 20); g.drawOval(110, 75, 30, 20); g.fillOval(68, 81, 10, 10); g.fillOval(121, 81, 10, 10); g.drawOval(85, 100, 30, 30); g.fillArc(60, 125, 80, 40, 180, 180); g.drawOval(25, 92, 15, 30); g.drawOval(160, 92, 15, 30);     } } Output:

Setting up java on local machine Part 1.

Introduction:-      So to set up the JAVA development enviorment we need do some setting which are basically easy. There can be of two setups which are the :-      1.  Command prompt (Actually the cmd setup)      2.  The IDE (Which are freely and licnesed) So in this post we will be seeing the Command prompt setup. What are the requirment for the setup?   The requirments for the setup are the to easy there is no back techno knowledge for the setup it is the basic requirment.   1. Internet Connection(To download the java development kit)   2. Adminstrator privilages Where to download the JAVA DEVELOPMENT KIT(JDK) ?   The JDK is nothing but a set of java tools that are given in the java standard edition which are freely downloadable from the  offical oracle site the current jdk version is 11 and by the time there shall be updates to the jdk for the time being it is the 11 edition. The fully...