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

اخواااني المساعده المساعده ضروووري

بدأه مبرمج صغير2 في 22 مايو 2008 · 1 رد · 483 مشاهدة · في الأسئلة المجابة
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

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

اخواني باختصار شديد وحتى لااطيل عليكم والاطاله فيها ملل والوقت من ذهب

عموما انا ادرس برمجه وفي بدايتي والدكتور طلب برنامج اعتبره صعب ولكن بفضل الله وبمساعدة اخواني في هذا المنتدى سوف تتذلل الصعاب

البرنامج عباره عن مصفوفه بالايام ومصفوفه بالساعات وتدخل فيها اوامر ومواعيد

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

من كان في عون اخيه كان الله في عونه والدعوه الصادقه في الغيب بإذن الله لها اثر على صاحبها

والسؤال في الاسفل

Description

The aim of this project is to program an agenda for one week. In this agenda, we can do the following

operations:

1- Add one appointment

2- Add 3 appointments

3- Print the agenda

4- Print agenda of one day

Data structures (You are not allowed to modify the following data structures)

Global types and constants:

enum EnumDays {Saturday, Sunday, Monday, Tuesday, Wednesday, Thursday, Friday};

const char *StrDays[] = {"Saturday", "Sunday", "Monday", "Tuesday", "Wednesday",

"Thursday", "Friday"};

const int NBHOURS = 24; // 24 hours a day

const int NBDAYS = 7; // 7 days a week

const int MAX_APPOINTMENTS = 168; // A maximum of one appointment per hour dayly

const int MAX_APPOINTMENT_LENGTH = 50;

Local variable to the main function:

int Agenda[NBHOURS][NBDAYS]; // 24 hours a day, 7 days a week

char AppointmentLabels[MAX_APPOINTMENTS][MAX_APPOINTMENT_LENGTH];

int nbAppointments;

Description of functions to be implemented

• void InitAgenda(int agenda[NBHOURS][NBDAYS]);

initialises all elements to -1

• void ReadAnAppointment(char *label, EnumDays &d, int &sh, int &duration);

Reads the appointment label in label, the day in d, start hour in sh, and the duration in duration.

You should make all the necessary validations (any appointment must starts and finishes in the

same day, the duration of an appointment should be no less than 1, and no more than 24 hours, etc.)

• void AddAppointment(char *label, EnumDays d, int sh, int duration, int

Agenda[NBHOURS][NBDAYS], char

appointmentLabels[MAX_APPOINTMENTS][MAX_APPOINTMENT_LENGTH],int &nbAppointments);

This function adds the appointment (label, day, start hour, and duration) to the agenda. The index of

the label in the AppointmentLabels array should be putted as the value in the Agenda array in the

corresponding day and hours.

• void PrintAgenda(const int Agenda[NBHOURS][NBDAYS], const char

AppointmentLabels[MAX_APPOINTMENTS][MAX_APPOINTMENT_LENGTH], int nbAppointments)

This function prints the full week agenda (7 days, 24 hours a day). The format of the output should

be exactly like the project demo.

• void PrintDayAppointment(EnumDays d, const int Agenda[NBHOURS][NBDAYS],

const char AppointmentLabels[MAX_APPOINTMENTS][MAX_APPOINTMENT_LENGTH])

This function prints the appointments for a specified day. The format of the output should be

exactly like the project demo.

• int main()

The program should act like project demo in all aspects.

#2

وأنا كذلك

في إنتظاركم أيها المبرمجين

في المرفقات ملف الـ demo

demo.rar

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

عدد الزوار حالياً

المتواجدون خلال آخر دقيقتين · يتحدّث كل ٣٠ ثانية

—الإجمالي—أعضاء مسجّلون—زوار بدون تسجيل

جارٍ التحقق من المتواجدين…