عرض مشاركة واحدة
منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
  #1  
قديم 04-05-2011, 09:30 PM
الصورة الرمزية لين20

لين20 لين20 غير متواجد حالياً

جامعي

 
تاريخ التسجيل: May 2011
نوع الدراسة: إنتظام
المستوى: الثاني
الجنس: أنثى
المشاركات: 6
Skaau.com (11) اريد المساعده في فهم البرنامج؟


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();




}


}
رد مع اقتباس