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

الله يوفقكم ممكن تحليل للبربلم

بدأه nory2000 في 20 ديسمبر 2009 · 1 رد · 434 مشاهدة · في الأسئلة المجابة
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

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

الله يوقكم يارب ممكن مساعده في هالبرنامجين لإني مافهمة السؤال ...

[leftCreate a time class. It has only one data member which is seconds only. This means that the time is represented internally as the number of seconds rather than three integer values, hour, minutes and seconds.

- Offer three constructors: a default constructor, a parameterized constructor which takes three integers and another parameterized constructor which takes one integer and sets the number of seconds since midnight.

- The print method should print the time in this format 12:01:11 AM.

Test your class using three time objects, one for each constructor.

السؤال الثاني

Create a class password that contains eight characters as member data.

- Define default constructor that initialize all member data to null

- Define non member function called encrypt, It takes one character as argument. Then it encrypt it by convert it into another character.

Use this formula newCharacter=Character-ASCII code Value

- Define non member function called decrypt; it takes one character as argument and decrypts it into the original character.

Each time you encrypt or decrypt a character, set the corresponded data member.

- In main, define a password object and set the values of its data member from user input. Encrypt the characters and display the new password to the user. Then, decrypt it and display the password to the user.

Hints:

- Decryption is the opposite operation of encryption.

- Use ASCII code to convert character into another one.

]

#2

تكفووووون الله لايحرمكم الجنه ساعدوني الله يرزقكم الشهادهـ

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