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
How is the go button on m computer?
bearhunter [10]

<span>Go appears in the menu bar when Finder has focus, not in the Finder window.</span>
7 0
3 years ago
An organization requires secure configuration baselines for all platforms and technologies that are used. If any system cannot c
Romashka [77]

Answer:

C. Process a risk acceptance for 2633 and remediate 3124.

Explanation:

There are various business risks. Some are inherited risks while other are risks are associated with nature of business. It is dependent on business owners that they want to accept risk or mitigate the risk. Risk acceptance is based on the strategy of the management. In the given scenario Accounting Prod Production has low risk 2633 which is accepted while 3124 is high risk which is remediated.

8 0
3 years ago
season is when the weather is not optimal and few tourists of vacation time a shoulder b high c average d low​
cricket20 [7]
Winter is such a season. Travel is lower to colder climate areas such as Canada, but higher to warmer climate areas like Columbia.
7 0
3 years ago
Read 2 more answers
What feature did the 32X add to the Sega Genesis?
il63 [147K]

Answer:

ngl why would i know this

Explanation:

5 0
3 years ago
Which Save As element allows a user to save a presentation on a computer?
mrs_skeptik [129]

Answer:

Option D, This PC allows a user to save a presentation on a computer

Explanation:

If one choses the option C, the file will be saved in the folder in which the user is working. Hence, option C is incorrect.

Like wise option A is also incorrect as it will require user to provide a location as option for saving the file

Option B is also incorrect as it will allow the user to save files in the C drive/D drive or one drive

Option D is correct because if the user choses this option file will be saved on the computer.

Hence option D is correct

7 0
3 years ago
Other questions:
  • Describe the benefits and drawback of using virtualisation on a single machine and also in a cluster environment
    10·1 answer
  • How do you calculate the total resistance in a series circuit with more than one resistor?
    9·1 answer
  • 1. What runs horizontally and is identified with numbers?
    12·2 answers
  • Help easy 50 points!!!!<br> How do i make someone be the brianliest? No crown thing is appering!!!!
    10·2 answers
  • What is the gear ratio?
    12·1 answer
  • Explain
    6·1 answer
  • 2) Please create a C program for the following: (25 points) a. Suppose the US dollar to Korean Won is 0.85 dollars to 1000 won.
    13·1 answer
  • Write a q basic program to find the sum of all the even numbers from 1 to 50​
    14·1 answer
  • An end-user license agreement protects _____.
    11·1 answer
  • Which data type is the correct choice to store the names of all the hockey players who have scored 3 or more goals in a single g
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!