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

help in assiginment

مغلق
بدأه saroona في 13 مارس 2005 · 3 رد · 426 مشاهدة · في ارشيف قسم C/C++
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

PLEASE any body can help me to solve this proplem??

it is my assignment i wrote the ADT and the main function , but the function i'm not sure about them (the function inside the class)

i'll write the proplem and i want somebody explain it to me

this is the proplem

a car is a vehicle that we use on daily basis to commute from one place to another. some of its main operations that makes it usable are:start,drive,stop,fill tank,and service. before we can drive the car we need to start it, we then drive it for a a certain distance and stop.

the car consumes petrol, engine oil, water and many other consumables while it is operating. therefore, we need to go to the petrol station to replenish fuel, and the more we drive the more fuel is consumed. periodically we need to service the car to replenish water and engine oil levels.

it is required from you to develop a data type for a car that has the main functions to start, drive, stope, fill tank, and service. the data members must at least include fuel, engine oil, and water. write a menu driven program that uses your car class to demonstrate its functionality.

#2

البرنامج هنا واضح انه على الـ console لذلك كل ما نحتاجه هو متغيرات داخل الـclass لتمثيل كل خصائص السيارة اللتي نحتاجها هنا.

مثلا, متغير bool IsStarted تكون حالته الأولية false و يقوم الـ start بتغيير هذا المتغير الى true

بالنسبة للـ drive فعليه ان يقوم بالتأكد من ان السيارة شغالة, يعني ان الـ IsStarted هو true فإذا فعل ذلك, ممكن يغير متغير آخر bool IsDriving الى true و يبدأ في تقليل متغير آخر خاص بالـ feul الخ.

الـ service ممكن يضع كل المتغيرات في وضعية مثالية .. يعني يملأ البنزين و الزيت .. الخ.

كل هذه مجرد متغيرات داخلية, و تقوم الـ methods بتغيير هذه المتغيرات حسب الحاجة.

#3

i said to you before that i need somebody to help me and teaching me live but no body answer my help thanx alot about that

thats because i didn't understand every thngs and no body give me the answer quickly

thanx aloot :(

#4

يمكن صعب تجد واحد متفرغلك .. حاول تسأل و إن شاء الله تلقي من يجاوبك

لقد حاولت الاجابة على موضوعك السابق

/index.php?showtopic=59088

لا أدري إن كان جوابي مفيدا ام لا,,,

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

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