الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

سؤالين عن الجافا

مغلق
بدأه ASOOOOM في 18 أكتوبر 2003 · 0 رد · 750 مشاهدة · في JavaSE
مشاركة: واتساب X فيسبوك تيليجرام
#1

يا شباب في فقرات في الهوموورك ما فهمت المطلوب.

The homework:

(a) Write a Box class that has:

1. Three constructors: A three-parameter constructor, a one-parameter constructor (used to create a box whose three sides are equal), and a parameter-less constructor (used to create a box whose three sides are each one meter).

2. The following methods: getVolume( ) , getSurfaceArea( ) that returns the surface area of a closed box, setLength(double newLength), setWidth(double newWidth), setHeight(double newWidth).

(B) Write a TestBox class that:

1. Creates three Box objects, using each of the Box constructors.

2. Modifies the length of one of the box objects.

3. Displays the total volume and the total surface area of the three boxes. Assume that the sides of each box object are in meters

-----------------------------------------------------------------------------------

1-في ال Methods :

setLength(double newLength), setWidth(double newWidth), setHeight(double newWidth).

ايش الغرض منها بالضبط في البرنامج ؟؟؟؟ وال return حقهم ايش احط فيه ؟؟

2- Modification of th length ايش الطريقة للتعديل الي لازم استدخدمها ؟؟؟

و جزا الله الي يساعدني خيرا

هذا الموضوع مغلق.

مواضيع مشابهة