أوكي .. هو بس سؤال مو راضي ينحل معايا ..
دا السؤال .. واول حل صحيح على الخاص باحوله :
Part 3 Method Overriding:
Do Exercise 9.7 (Equals method for bank account classes – see section 9.7.1 for more information
on equals which we used to compare String objects previously). Note: There is a typo on page
478. The prototype of the first equals example should read : public boolean equals(Object obj)
and not public boolean equals(Point p). Correct output from the tester:
ba1 != ba2
ba2 = ba3
ba1 != ba3
ba2 != jba1
ba1 = jba1
◮ Exercise 9.7 (Equals method for bank account classes)
Write the equals method for the BankAccount and JointBankAccount classes assuming that
two accounts are equal if they have the same account number.
نو نــ Master'sـــا July 2nd, 2010, 11:31 PM
7 " هههههههههههههههههههههههههههههههههههههههههههههههههه هههههههههه
الحلم كندا July 2nd, 2010, 11:37 PM
7 " لوجة .. سلمون ولا مشاااااااااااااااوي .. ؟
لحن .. اوما .. مشيب مرة وحدة .. !!
نو نــ Master'sـــا July 2nd, 2010, 11:39 PM
7 "
دا السؤال .. واول حل صحيح على الخاص باحوله :
Part 3 Method Overriding:
Do Exercise 9.7 (Equals method for bank account classes – see section 9.7.1 for more information
on equals which we used to compare String objects previously). Note: There is a typo on page
478. The prototype of the first equals example should read : public boolean equals(Object obj)
and not public boolean equals(Point p). Correct output from the tester:
ba1 != ba2
ba2 = ba3
ba1 != ba3
ba2 != jba1
ba1 = jba1
◮ Exercise 9.7 (Equals method for bank account classes)
Write the equals method for the BankAccount and JointBankAccount classes assuming that
two accounts are equal if they have the same account number.