الويب العربي

الويب العربي (http://www.arabwebtalk.com/index.php)
-   تبادل خبرات البرمجة (http://www.arabwebtalk.com/forumdisplay.php?f=57)
-   -   سؤال بالبرمجة الله يجزاكم خير (http://www.arabwebtalk.com/showthread.php?t=128559)

سلام11 04-12-2009 07:35 PM

سؤال بالبرمجة الله يجزاكم خير
 
السلام عليكم ورحمة الله وبركاته..
الله يعطيكم العافية هذا سؤال وأتمنى ألاقي الحل عندكم...
A Bank wants keep all accounts for each customer; that is, one customer can have
more than one accounts and therefore balances (you do not know how many accounts he/she
may has. Each customer has unique identifier (ID) which is generated automatically and once

established it can’t be modified
.
Bank specifies that if the balance is more than or equal 20.000 SR then its type is
golden and if it’s more than 5000 SR then its type is silver, otherwise it is a bronze account.
1- Complete the following code
2- Use non class member function which takes objects as argument to compare two
accounts and return customer ID that has more accounts. [note that this function
can access private data members of the class directly


.................................................. .................................................. ................

#


include <iostream>
using namespace std;
class Account{
double Balance;
public


:
double getBalance(){return Balance


;}
void setBalance(double balance){Balance = balance}}
int specifyType)(
{


//Complete
It should return 3 for golden, 2 for silver, 1 for
bronze}
void print(){cout<<"Balance Amount: "<<Balance<<"\n


};"
};
//=============================
class BankCustomer{
//Write a composite object here
int numberOfAccounts;
public:
BankCustomer(int numberOfAccounts); //Set Balance for each bank
account
~BankCustomer();
void print(); //Make this function call Account print function
);
//=============================
int main()
{
//Complete
return 0;
{


سلام11 04-12-2009 09:14 PM

كل هذي المشاهدات وحد رد!!!
وينكم الله يخليكم

مصطفى عبد الرحمن 05-12-2009 08:01 AM

سلام الله عليكم
هذا الكود بلغة ال c++ وهناك استعلام خاطى فى انشاء الدوال ما بين المعطيات واعطاء كل عميل حساب فى بنك ما
هذا ما فهمته
فهل من الممكن ان تعطينا نبذة عن ما تريد او اترك الموضوع لاحد مبرمجى السى بلاس فهم اقدر منى بتحليل مشكلتك هذه
سلام الله عليكم

eng.eslam 05-12-2009 10:09 AM

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

عزيزي راجع البنك الذي انت انشات به حسابك

او بالاحري ادخل رقم حساب صحيح

شكرا

مصطفى عبد الرحمن 05-12-2009 10:21 AM

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

سلام11 06-12-2009 04:46 PM

الله يعطيكم العافية جميعاً

هذا سؤال بلغةc++
ومشكورين على مروركم..لكن ليتكم تقدمتوا شوي كان عندي تسيلم على هذا السؤال
لكن الجاي أكثر ..
اكرر شكري..
دمتم بعافية

مصطفى عبد الرحمن 07-12-2009 12:46 AM

..لكن ليتكم تقدمتوا شوي .... هل ممكن توضيح معنها
كان عندي تسيلم على هذا السؤال ..... هل هذه المشكلة فى ريبورت خاص بك فى دراسة ما ؟؟؟

انتظر ردك


جميع الأوقات بتوقيت مكة المكرمة. الساعة الآن » 02:00 AM.

Powered by vBulletin
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © ArabWebTalk.Com 2004-2012