1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Lostsunrise [7]
3 years ago
9

The following program draws squares recursively. Fill in the missing code. import javax.swing\.\*; import java.awt\.\*; public c

lass Test extends JApplet { public Test() { add(new SquarePanel()); } static class SquarePanel extends JPanel { public void paintComponent(Graphics g) { super.paintComponent(g); int width = (int)(Math.min(getWidth(), getHeight()) * 0.4); int centerx = getWidth() / 2; int centery = getHeight() / 2; displaySquares(g, width, centerx, centery); } private static void displaySquares(Graphics g, int width, int centerx, int centery) { if (width >= 20) { g.drawRect(centerx - width, centery - width, 2* width, 2 * width); displaySquares(________, width - 20, centerx, centery); } } } }
Computers and Technology
1 answer:
ExtremeBDS [4]3 years ago
8 0

Answer:

The missing code to this question is g.

Explanation:

In this question firstly import packages. Then declaration of the class Test that inherits the JApplet. In this class, we declare the default constructor. In this constructor, we call the add function. Then we declare another class that is SquarePanel. This class inherits JPanel. In this class, we define a method that is paintComponent(). In this method, we define an integer variable. In this method, we perform calculations and pass it to another function that is displaySquares(). In this function, we pass the value as the arguments. So in question the missing code or argument is g.

You might be interested in
A company needs to store its documents in one place, share news and information with all staff, and allow access for employees w
Alenkasestr [34]
C - An Intranet will give access to all employees within the company, whether they work from home or at the office.
4 0
3 years ago
Read 2 more answers
What are the advantages and disadvantages of nuclear energy?
Vilka [71]
Advantages: Nuclear energy has the ability to produce electricity without greenhouse gas emissions. It produces electricity without pollution

Disadvantages: The nuclear weapons threats. Some reactors produce plutonium which can be used to make nuclear weapons
7 0
3 years ago
A fitness tracker can be classified as a wearable computer. true
Kay [80]
Depends, but I'd say false.
5 0
3 years ago
Landslides often accompany earthquakes and volcanoes and pose an additional threat to humans after these events.
xxTIMURxx [149]
I think the answer is tur
5 0
3 years ago
Which of the following is not a characteristic of Web 2.0?
Dmitry [639]

Answer:

c. mentorship programs taking place via the internet

Explanation:

The World Wide Web (WWW) was created by Tim Berners-Lee in 1990, which eventually gave rise to the development of Web 2.0 in 1999.

Web 2.0 can be defined as a collection of internet software programs or applications which avails the end users the ability or opportunity to share files and resources, as well as enhance collaboration over the internet.

Basically, it's an evolution from a static worldwide web to a dynamic web that enhanced social media. Some of the examples of social media platforms (web 2.0) are You-Tube, Flickr, Go-ogle maps, Go-ogle docs, Face-book, Twit-ter, Insta-gram etc.

Some of the main characteristics of Web 2.0 are;

I. Social networking.

II. Blogging.

III. Interactive comments being available on many websites.

Also, most software applications developed for Web 2.0 avails its users the ability to synchronize with handheld or mobile devices such as smartphones.

However, mentorship programs taking place via the internet is not a characteristic of Web 2.0 but that of Web 3.0 (e-mentoring).

7 0
2 years ago
Other questions:
  • An attribute whose value uniquely identifies an object is called a(n) _______.​
    15·1 answer
  • Jeff wants to print quickly so he presses the Ctrl and the P. Jeff used a _____. macro invoice template shortcut
    15·1 answer
  • You are an administrator for contoso.com. you have two servers called server1 and server2 that run windows server 2012 and have
    9·1 answer
  • Black Ops 3 For Ps4 Players Here
    7·1 answer
  • Upon looking out at the
    8·2 answers
  • I need help plzzzzzzzz
    10·2 answers
  • John Cleaver is the CEO of Tech World, which is a retail store that sells computers, monitors, cameras, televisions and many oth
    6·1 answer
  • ap csp The local, remote, and upstream _______ can each have multiple ___ _____. When a participant in a collaborative group on
    5·1 answer
  • your friend's parent's are worried about going over their budget for the month. Which expense would you suggest is NOT a need?
    11·1 answer
  • 1
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!