الموضوع: واجب برمجة
عرض مشاركة واحدة
منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
  #1  
قديم 15-02-2014, 03:55 PM

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

جامعي

 
تاريخ التسجيل: Feb 2014
الكلية: أخرى
نوع الدراسة: إنتظام
البلد: منطقة الرياض
الجنس: أنثى
المشاركات: 6
افتراضي واجب برمجة


السلام عليكم ورحمة الله وبركاته

أبي مساعدة منكم في حل هذا الواجب بلغة الجافا الله يسعدكم

Modify the set methods in class Time2 to return appropriate error values if an attempt is made to set one of the instance variables hour, minute or second of an object of class Time to an invalid value. [Hint: Use boolean return types on each method.] Write a program that tests these new set methods and outputs error messages when incorrect values are supplied.

+
Write a Test class that creates a Time2 object and displays a menu of options to the user as shown in the sample output. Your program should process each choice and print out the object data after modification. The user should be allowed to repeat this process until he/she chooses the exit option.
رد مع اقتباس