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]
2 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]2 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
Which windows utility should you use to organize the files on your disk to improve efficiency?
olga55 [171]

<span>Disk Defragmenter, is a windows utility that rearranges the records and unused space on the PC's hard disk so that the operating system accesses data more rapidly and projects run quicker. Disk Defragmenter keeps running on a timetable, yet you can likewise break down and defragment your disk and drives manually.</span>

7 0
2 years ago
Advertising andpublicity are used to:
WINSTONCH [101]

Answer:

d. All of the given options

Explanation:

Great question, it is always good to ask away and get rid of any doubts that you may be having.

<u>Advertising and Publicity</u> is used for many reasons.

Retail Companies use advertising and publicity to promote their products and in term increase sales of that product when it hits the shelves.

Meanwhile, other companies such as Law Firms use advertising and publicity create awareness for their law firm and communicate with customers over high profile case etc.

Therefore, the answer is all of the above.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

5 0
2 years ago
Which of these can be used as a smartphone with the power of a laptop?
sashaice [31]
I would go with A) Tablet because that's basically a bigger phone and mobile cmp combined, its not D) because that's a synonym for a smartphone and not C) because paper and pencil is not like a smartphone, and not B) because that's like reading online books.
4 0
2 years ago
Read 2 more answers
The Sales team uses the /sales directory to store documents related to sales, contacts, and orders. Currently, permissions on th
kvasek [131]

Answer:

it should be d

Explanation:

please mark this as brainlists i could really use it

6 0
2 years ago
when a sender encrypts a message using their own private key, what security service is being provided to the recipient?
Rudik [331]

asymmetric encryption

4 0
3 years ago
Other questions:
  • Which command on the Insert tab of the PowerPoint Online application is used to add a Venn diagram or process chart to a present
    12·2 answers
  • Scenes that are shot outside are known as
    9·1 answer
  • Which of the following is the best definition of being a “digital citizen”?
    6·2 answers
  • Which group on the home tab contains the line spacing attribute?
    7·1 answer
  • What is another term for accountability?
    7·2 answers
  • Write an algorithm that receives a number from the user (you can store the number in a variable called N). Then the algorithm sh
    8·1 answer
  • A jackhammer uses pressurized gas to transmit force to the hammer bit. What type of mechanical system is it?
    13·1 answer
  • What is considered appropriate dress for men and women in the workplace? Select all that apply.
    6·2 answers
  • Having sound enhances your App, do you agree with this? Explain.
    9·1 answer
  • a functional policy declares an organization's management direction for security in such specific functional areas as email, rem
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!