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

سؤال في C++

مغلق
بدأه ينابيع في 2 نوفمبر 2007 · 2 رد · 1,055 مشاهدة · في الأسئلة المجابة
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

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

انا ادرس لغة السي بلس بلس و بدأنا بالبروجكت

لكن ما فهمت السؤال لأنه بالانقلش.فممكن تشرحونه(شرح فقط ما ابغى الحل)اذ تكرمتوا

نص السؤال

You are required to implement a student registration system. The system keeps information about the students including their id, which is an automatic number issued by the system, a name, and current number of courses. It is important to keep the count of courses a student is currently enrolled in since he is only allowed to register for 4 courses at any given point in time. The system should facilitate course registration and dropping through appropriate functions. The system should also keep record of the date in which the student enrolled.

Information about courses is also needed. For each course, the id and number of credits is stored. The id of the course is a single string composed of two parts: a two character code specifying the major (e.g. CS for Computer Science, MA for Mathematics, EC for economics.. etc) and a serial number, which, unlike the code, is generated by the system.

و هو عبارة عن مجموعة من التاسك اول تاسك طلبت فيه

Task A

Create a header file for the class student which contains the following header, then write its implementation file.

#ifndef STUDENT_H_

#define STUDENT_H_

#include <iostream>

#include <string>

using namespace std;

class Student{

private:

static int serialId;

const int id;

string name;

int currentCourses;

bool canRegisterMore();

public:

Student(string studentName);

bool registerCourse();

void dropCourse();

void printDetails();

};

#endif /*STUDENT_H_*/

و التاسك الثاني

Task B

Write a course class which contains number of credits and a string id. In addition to the constructor, it should contain a print function.

الله يجزاكم خييييير ساعدوني و فهموني السالفة.....

#2

السلام عليكم

أولا : كان ينبغى قراءة - قواعدالمنتدى للمشاركة - وطرح الاسئلة

حيث يمنع حل التمارين والواجبات الدراسية - يمكنك طرح السؤال على المعلم فى الجامعة - او زميل فى الدفعة

ثانيا : اذا كانت هناك مشكلة فى فهم اللغة الانجليزية - يمكنك اللجوء لبرامج الترجمة - او القاموس ان لزم الامر

ثالثا : عند كتابة اى اكواد فى المشاركة - يرجى كتابتها فى المكان المخصص

The Place of code مكان الكود

مع تحياتى

#3

جزاك الله خير أخي ....

لكن انا ما طلبت الحل و أنا وضحت ذلك.....

بالنسبة لبرامج الترجمة تترجم بشكل عام و يستحيل أبني على ترجمتها الحل ......

و هذا هو الكود.....

#ifndef STUDENT_H_

#define STUDENT_H_



#include <iostream>

#include <string>

using namespace std;



class Student{

private:

static int serialId;

const int id;

string name;

int currentCourses;

bool canRegisterMore();



public:

Student(string studentName);



bool registerCourse();



void dropCourse();



void printDetails();



};

#endif /*STUDENT_H

_*/

تم تعديل هذه المشاركة بواسطة ينابيع في 2 نوفمبر 2007 في 16:08

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

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