Create the logo as shown in Java in an applet or frame. It should be as close as
ID: 3695223 • Letter: C
Question
Create the logo as shown in Java in an applet or frame. It should be as close as possible, including the Virus Logo. Draw the logo using ovals, lines, rectangles, and strings, changing colors and using draw or fill as necessary. Change to appropriate virus colors (like Blue and Cyan) and fonts for the text in the drawing. Everything should be drawn in paint() with your Graphics object. After creating one virus, usecopyArea() to copy the virus bugs to other areas of the Container.
Document your .java file with five lines at the top and five lines throughout explaining the purpose of the program. Take a picture of your output with <Alt><Ptr>, paste into Paint, and save as a .jpg. Submit both your .java program and .jpg files.please help me with questions and make sure u post the image of the output as sme as the image I provided
Explanation / Answer
//Viruslogo.java
import java.applet.*;
import java.awt.*;
//<applet code=Viruslogo height=600 width=800></applet>
public class Viruslogo extends Applet
{
public void paint(Graphics g)
{
g.setColor(Color.red);
g.drawOval(20,40,250,250);
g.fillOval(50,100,50,70);
g.fillOval(185,100,50,70);
g.drawLine(138,160,138,210);
g.drawLine(138,210,155,210);
g.drawArc(95,156,100,100,180,180);
Font f=new Font("TimesRoman",Font.BOLD,35);
g.setFont(f);
g.setColor(Color.blue);
g.drawString("COMPUTER VIRUS :",250,300);
}
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.