نوره 12

نوره 12 @norh_12_1

محررة فضية

تكفون الى تعرف برمجه بلغه ++c

الحاسب والجوال

ممكن احد يحل للى هذا البرنامج تعبت فيه الله يوفقها الى تساعدنى

Assignment 6:

Computer users see cursors all the time. A cursor appears on a particular row, at a particular column; the arrow keys usually move the cursor up, down, left, and right.

Your task is to write a Cursor class that models the position and movement of a cursor. Assume that row numbers are 0 to 23; column numbers are 0 to 79. The upper left corner is row 0, column 0. The Cursor class should include the following member functions:
  • A default constructor that initializes the cursor to row 0, column 0.
  • A non-default constructor that takes two intparameters, for the row and the column. If the row or the column is invalid (less than 0, or greater than row 23 or column 79), then bothare set to 0 instead. (Both are set to 0 even if only one of the parameters was invalid.)
  • An accessor function get_row that returns the cursor's row number (0-23).
  • An accessor function get_column that returns the cursor's column number (0-79).
  • A mutator function up that moves the cursor up one row. If the cursor is already on row 0, it should remain there.
  • A mutator function down that moves the cursor down one row. If the cursor is already on row 23, it should remain there.
  • A mutator function left that moves the cursor left one column. If the cursor is already on column 0, it should remain there.
  • A mutator function right that moves the cursor right one column. If the cursor is already on column 79, it should remain there.

Test your class.
3
437

يلزم عليك تسجيل الدخول أولًا لكتابة تعليق.

تسجيل دخول

نبضة حزن
نبضة حزن
السلام عليكم ,,

حياك الله اختي ..

نصيحة لا تنتظرين احد يحله لك..

حليه بنفسك حاولي واغلطي ..

كلمي صديقاتك واطلبي منهم يشرحونه لك و يوضحون لك النقاط اللي صعبت عليك..

اذا وصلك الحل جاهز ماراح تستفيدي ابدا حاولي

و تذكري انه على ورقة الاختبار ماراح احد يساعدك

واهم نقطة توكلي على ربك واطلبي منه العون ..

ودي اساعدك لكن عندي واجبات بالكوم :)

بس اذا اشكل عليك شيء اسألي وماراح اقصر اذا قدرت ..

موفقه ,,
نبضة حزن
نبضة حزن
السلام عليكم ,,

حياك الله اختي ..

نصيحة لا تنتظرين احد يحله لك..

حليه بنفسك حاولي واغلطي ..

كلمي صديقاتك واطلبي منهم يشرحونه لك و يوضحون لك النقاط اللي صعبت عليك..

اذا وصلك الحل جاهز ماراح تستفيدي ابدا حاولي

و تذكري انه على ورقة الاختبار ماراح احد يساعدك !!

واهم نقطة توكلي على ربك واطلبي منه العون ..

ودي اساعدك لكن عندي كومة واجبات :)

بس اذا اشكل عليك شيء اسألي وماراح اقصر اذا قدرت ..

موفقه ,,
نوره 12
نوره 12
هلا نبضه الله يعافيك انا صراحه حاولت احله بس ماعرفت طيب تعرفين انتى تشرحين لى الفكره بس انا ماقدرت استوعب والله يعافيك ويسهل عليك