اريد المساعده في فهم البرنامج؟
Write a java application to manage Flower Store. Each Flower Store item is a String.
Use vector to hold the items, Test your work with a main program that does the following:
1. Create an empty vector. Print it.
2. Append the items, "Ross", "Acacia", "Lavender" , "Balsam" and "Jasmine" to the list. Print it.
3. Remove the last element from the vector. Print it.
4. Append the item, "Gardenia" to the vector. Print it.
5. Write a loop that searches for the item, "Acacia" and replace it with "Iris" Print the vector.
6. Write a loop that searches for the item, "Balsam" and then remove it from the vector. Print the vector.
اريد المساعده وفهم المطلوب حله؟؟؟؟؟
وهذه محولاتي:
import java.util.Vector;
public class Vector {
public static void main(String[] args){
Vector<FlowerStore> v=new Vector<FlowerStore>();
FlowerStore f1=new FlowerStore();
FlowerStore f2=new FlowerStore();
FlowerStore f3=new FlowerStore();
FlowerStore f4=new FlowerStore();
FlowerStore f5=new FlowerStore();
f1.setFlower("Roos");
f2.setFlower("Acasia");
f2.setFlower("Lav");
f2.setFlower("Balsm");
f2.setFlower("jams");
System.out.println();
}
}
|