السلام عليكم ورحمة الله وبركاته
مساكم الله بالخير
اخواني انا عندي اسايمنت وكل الامور والله الحمد ممتازه وعملت كمبايل وماشي زي الفل بس الدكتوره طلبت مني اليوم اني اضيف عليه بعض الإضافات وهي موجوده باللون الاحمر وهي عبارة عن لما ابغى اطبع الاسماء او اضيف اسم
طبعاً الملف هذا عبارة عن interface
واي مزيد من الاسئلة انا حاضر
=== عموماً الاصايمنت كامل مرفق مع الموضوع
عموماً التسليم بعد بكره ان شاء الله يوم الجمعة قبل الساعة 2 في الليل من يوم الخميس عندكم في المملكة ولكم مني كل الشكر والتقدير
mport java.util.*;
interface ListADT{
/* from assignment specs
: need to be able to print out in order of name
: need to be able to update, delete, search etc by name
/* Returns a string representation of the ListADT
* form: No.:(Name Symbol Qty unit class)
* @return a string representation of the ListADT
*/
public String toString();
/* A new instance of this ListADT, not just another reference
* : [TRUE, result = this]
* @return a copy of this DataSet
*/
public ListADT copy();
/* Removes all "key item pairs" from this ListADT
* this : [ TRUE, this = { } ]
*/
public void makeEmpty();
/* Check wether this ListADT is empty
* : [TRUE, result = ( this = { } ) ]
* @return the boolean value 'this ListADT is empty'
*/
public boolean isEmpty();
/* Return the number of 'key-item pair' in this ListADT
* : [ TRUE , result = #this ]
* @return the number of "key item pairs" in this ListADT
*/
public int size();
/* include the "key item pair" in this ListADT
* this : [ #this<max, <br>
* (~Es:this0 | hd s = key & this=this0 + <k,item> & result=TRUE)
* OR
* ( Es:this0 | hd s = key & this = this0 & result=FALSE)]
*
* @param key the key to be added to this ListADT.
* @param item the item to be added to this ListADT.
* @return ( true and the "key item pair" "key","item" have been added
* to this ListADT )
* OR
* ( false and "key" was already in this ListADT
* and this ListADT is unchanged )
*/
public boolean include(Element key, Element item);
/* exclude the "key item pair" having "key" as its key from this ListADT
* this : [ TRUE, <br>
* ( Es:this0 | hd s = key & this = this0 - s & result = TRUE)
* OR
* (~Es:this0 | hd s = key & this = this0 & result = FALSE)]
*
* @param key the key of the "key item pair" to be removed
* @return ( true and the "key item pair" having "key" as its key has
* been removed from this ListADT ) <br>
* OR
* ( returns false and a "key item pair" having "key" as its key
* was not present in this DataSet and this DataSet is unchanged )
*/
public boolean exclude(Element key);
/* get the item associated with a specified key
* item : [ TRUE, <br>
* ( Es:this | hd s = key & result = hd(tl(s)) )
* OR
* (~Es:d | hd s = key & result = null)]
* @param key the key for which the matching item is required
* @return ( a copy of the item associated with "key" )
* OR <br>
* ( null and "key" is not found in this ListADT )
*/
public Element get(Element key);
/* update the "key item pair" having "key" as its key so that "item" is
* the new item associated with "key"
* this:[ TRUE, <br>
* ( Es:this0 | hd s = key & s = <key,item> & result = TRUE)
* OR
* (~Es:this0 | hd s = key & this = this0 & result = FALSE)]
*
* @param key the key of the "key item pair" to be updated
* @param item the new item for the "key item pair" associated with "key"
* @return (true and the "key item pair" having "key" as its key has
* been updated to have "item" as its item ) <br>
* OR <br>
* ( false and a "key item pair" having "key" as its key
* was not found in this DataSet and this ListADTis unchanged )
*/
public boolean update(Element key, Element item);
/* Check whether "key" is a key in this ElementADT <br> <br>
* : [ TRUE, result = ( Es:this0 | hd s = key )
*
* @param key the key being searched for in the ElementADT
* @return the boolean value '"key" is a key in this ElementADT'
*/
public boolean hasKey(Element key);
/** find the smallest key in this NON-EMPTY ElementADT
* : [ #this > 0, (Es:this | Vr:this hd s <= hd r) & result = hd s]
*
* @return the smallest key in this ElementADT
*/
public Element minKey();
/** find the largest key in this NON-EMPTY ElementADT
* : [ #this > 0, (Es:this | Vr:this hd s >= hd r) & result = hd s]
*
* @return the largest key in this ElementADT
*/
public Element maxKey();
}//interface