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
Illusion [34]
3 years ago
6

LAB: Plant information (ArrayList) Given a base Plant class and a derived Flower class, complete main() to create an ArrayList c

alled myGarden. The ArrayList should be able to store objects that belong to the Plant class or the Flower class. Create a method called printArrayList), that uses the printinfo methods defined in the respective classes and prints each element in myGarden. The program should read plants or flowers from input (ending with -1), adding each Plant or Flower to the myGarden ArrayList, and output each element in myGarden using the printinfo method Ex. If the input is: plant Spirea 10 flower Hydrangea 30 false lilac flower Rose 6 false white plant Mint 4 -1 the output is: Plant Information: Plant name: Spirea Cost: 10 Plant Information: Plant name: Hydrengea Cost: 30 Annual: false Color of flowers: lilac Microsoft Edge Plant Information: Plant name: Hydrengea Cost: 30 Annual: false Color of flowers: lilac Plant Information: Plant name: Rose Cost: 6 Annual: false Color of flowers: white Plant Information: Plant name: Mint Cost: 4 LAB ACTIVITY 9.18.1: LAB: Plant information (ArrayList) 10/10 Current file: PlantArrayListExample.java Load default template... 1 import java.util.Scanner; 2 import java.util.ArrayList; 3 import java.util.StringTokenizer; 4 5 public class PlantArrayListExample { 6 7 // TODO: Define a PrintArrayList method that prints an ArrayList of plant (or flower) objects 8
Computers and Technology
1 answer:
sashaice [31]3 years ago
4 0

Answer:

LAB: Plant information (ArrayList) Given a base Plant class and a derived Flower class, complete main() to create an ArrayList called myGarden. The ArrayList should be able to store objects that belong to the Plant class or the Flower class. Create a method called printArrayList), that uses the printinfo methods defined in the respective classes and prints each element in

You might be interested in
What will be the output of the following code?
mojhsa [17]

Answer:

it schold be C = False di True True

5 0
3 years ago
Karen is designing a website for her uncle's landscaping business. She wants to ensure that it's engaging and provides a lot of
Rashid [163]

Explanation:

Talk About The Benefits. of your  service over other compines

4 0
2 years ago
witch option in a presentation program contains the formatting and placeholders for all the items that appear on a slide?
Nikitich [7]

SWITCH BETWEEN OPEN PRESENTATIONS. ..... Presentation software is a program designed for the production and display of .... image file format and version number. 1. .... Option. To Do This. Normal. Contains three panes: the outline pane, the slide pane, and the notes pane. .... appear on every slide in a presentation.

7 0
3 years ago
Read 2 more answers
All of the following are forms of verbal communication except
Radda [10]
B. hand gestures
these are not verbal.
4 0
3 years ago
Read 2 more answers
This is your code.
lubasha [3.4K]

Answer:

35

Explanation:

We will be going inside B array, because he was in second place in array E,and will be the first element of array B, so it's 35

E can be understanded as:

E=[[21, 'dog', 'red'],[35, 'cat', 'blue'],[12, 'fish', 'green']], so, you can see array E as array of arrays or so-called two-dimensional array

6 0
2 years ago
Other questions:
  • Which of the following is an example of a problem that could be attributed to poor ergonomics?
    10·1 answer
  • When you send an echo request message with the ping program, a successful attempt will return a(n) ______ message.
    8·1 answer
  • What is the day adopt me launched its game on roblox?​
    14·2 answers
  • Corey is an architect. What software does he most likely use to design houses? graphic software scheduling software CAD software
    10·2 answers
  • Which is a good plan for backing up data?
    6·1 answer
  • ? Question
    6·2 answers
  • Examine the following algorithm.
    9·1 answer
  • What is a key differentiator for Accenture when delivering Artificial Intelligence (AI) solutions to clients?
    11·1 answer
  • You were just hired as an IT Specialist for Smalltown School District. Your first assignment is to review a problem area& in
    11·1 answer
  • Please can someone solve this question<br>What is a software and types of software​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!