![]() |
OOP / C++/C / JAVA Let's Program
السلام عليكم ورحمة الله وبركاته
انا لقيت ان المنتدى انشغل بأسئلة خاصة بالتنسيق والاختيار وحاجات زى كدا بنرحب بها طبعا ولكنها اثرت على مستوى المنتدى بالسلب لهذا قررت اعمل الموضوع دا واتمنى ان يكون فى مشاركة وخاصة انه عملى جدا وهو عن البرمجة اى حد عنده مسأله برمجة بلغات oop / c++/c / java وانا اخترت ال 4 لغات دول لانهم المشتركين فى غالبية الكليات يكتبها ونشترك كلنا فى حلها ونناقش الحلول وبكده هننشط المنتدى مرة اخرى مش شرط انك تكون مش عارف المسألة عشان تكتبها ممكن يكون غيرك مش عارفها واعتقد بكدا هنقدر ننمى مهاراتنا ونستفيد من المنتدى احسن من كدا انا هبدأ بمسألة كنت اخدها فى الكلية السنة اللى فاتت كانت ضمن مجموعة مسائل فى مشروع للمادة . -------------------------------------------------------------------------- oop problem #1 Create a SavingsAccount class. Use a static data member annual InterestRate to store the annual interest rate for each of the savers. Each member of the class contains a private data member savingsBalance indicating the amount the saver currently has on deposit. Provide member function calculateMonthl yInterest that calculates the monthly interest by multiplying the balance by annual InterestRate divided by 12; this interest should be added to savingsBalance. Provide a static member function modifyInterestRate that sets the static annualInterestRate to a new value. Write a driver program to test class SavingsAccount. Instantiate two different objects of class SavingsAccount, saver1 and saver2, with balances of$2000.00 and $3000.00,respectively. Set the annual InterestRate to 3 percent. Then calculate the monthly interest and print the new balances for each of the savers. Then set the annualInterestRate to 4 percent and calculate the next month’s interest and print the new balances for each of the savers معكم المسألة نفكر فيها وبعد فترة من المناقشة والتفكير هنزل حلها |
السلام عليكم
للاسف الموضوع ملقاش اى اهتمام من الاعضاء على عكس ما كنت متوقع وده حل المسألة كود:
#include<iostream> |
بسم الله الرحمن الرحيم
السلام عليكم و رحمة الله و بركاته أنا عندي سؤال احتمال كبير يبقى أهبل ليه بنكتب using namespace std; مش using std; زي في أي namespace عادية السلام عليكم و رحمة الله و بركاته |
اقتباس:
يمكن عشان كدا شكلها احلى سووري ,, بس انا والله بموت في البرمجة بس مش فاهم اي حاجه ,, لسه مبتدئ يعني :049gc0: |
شكرا ليك يا باشمهندس احمد بس عاوزين مسائل على ال سى ++ الله يكرمك
|
اقتباس:
كل عام وانتم بخير اسف للغياب الطويل لظروف الدراسة بالنسبة لسؤالك يابشمهندس هوا مش سؤال اهبل ولا حاجة ودا الرد على سؤالك using namespace std library in c and c++ that contains set of classes , objects and functions the commonly used functions from this library is cout , cin , endl if you write ur program without using namespace std the compiler will give u error function(cout,cin,endl.....) undeclared to declare this functions without writing using namespace std use this syntax std::cout std::cin std::endl see examples 1- with using namespace std كود:
#include<iostream> كود:
#include<iostream> اتمنى انى اكون وفقت فى توصيل المعلومة ولى فى اى استفسار انا موجود |
جميع الأوقات بتوقيت GMT +2. الساعة الآن 06:58 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.