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

سؤال .. و طلب مسآآعدهـ

بدأه smart apple في 22 أكتوبر 2010 · 8 رد · 541 مشاهدة · في الأسئلة المجابة
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

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

عندي سؤال ولازم أحله .. بس الله يسعدكم ابغا توضحون لي كيف احله بس

السؤال فهمته أنا و عرفت اش المقصود بس ما قدرت أستخدم الأشياء المطلوبه فيه ...

وهذا هو السؤال :

A mini supermarket allows postponing payments for goods for his known customers with limits on the total debt. The owner of the supermarket decided to use a computer program to facilitate supermarket management. Using this program, makes a lot of operations easier such as finding the total debt for a certain customer, adding new information for a customer.

Suppose that a supermarket has only 10 customers, each customer can have 50 S.R as a maximum for debt..

Develop a program with the following technical details:

• Use constructor to initialize data members.

• Use this pointer in get functions . (You may not need set functions)

• Develop a function for adding the debt for customer and validate if the total of debt(the new amount with the old debt)is more than 50 S.R (alert message should be printed),if it is less than 50 S.R ,add the new debt

• Develop a function that clears all debt from certain customer, ask the user to enter the customer number, and validate it to be in range .

• Develop a function “CustomerInformation” that prints the customer information.

• Make a menu driven main program to test all functions as followings:

1. Print number of customers and the max debt

2. Adding new debt for certain customer.

3. Clear all debt from certain customer

4. Print customer information

5. Exit

كيف أصلّح الكلاس وش الداتا ممبر اللي أحطها و الممبر فنقشن و كيف أسوي باراميترايز كونستركتر و كيف استخدم this pointer !!! :(

وهل الممبر فنقشن راح تكون نفس الفنقشن المطلوبه في السؤال ؟

ارجووكم أي أحد عندهـ معلومة لاااااا يبخل عليّ ..

ولكم دعواتي

#2

ان شاء الله يساعدونك :wacko:

#3

شكرا اختي

انتظر المساعدهـ .. ولو بتوضيح بسيط

لكم دعواتي

شكرا اختي

انتظر المساعدهـ .. ولو بتوضيح بسيط

لكم دعواتي

#4
#include<iostream>
using namespace std;
 class customer :
 {	int t;
	double d;

	customer()
	{
		t=0;
	    d=50;
	}
#5

أشكرك أختي ...

هذي طريقة الباراميترايز كونستركتر .. يعني ما أحط له باراميتر فقط أقواس () فارغه ...

وبالداخل {} احط قيم ابتدائية ..

#6

طيب وهو مطلوب كذا باول فقره :blink:

#7

نسيت أقول انو لازم أستخدم Dynamc Allocation عشان يكون الأري مو محدد بعدد من الإندكس .. يعني وقت الرن يدخل اليوزر عدد الاندكس

و نستخدم بوينتر ثم نحوله الى آري >> كما قالت استاذتنا

اللي هو بالاويريتر new

أتمنى فهمتوا عليّ

#8

تقدين ايش نسوي بوينتر بالمين

وبعدين تعرفين اراي وتحطين قبله كلمه نيو؟؟

#9

قالت الاستاذة انو نعرّف بوينتر في الكلاس ضمن الداتا ممبر

بعدين في الكونستركتر نحوله الى آري .. يعني نحط () ptr=new int

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