اذهب إلى المحتوى

حمامه السلام

الأعضاء
  • المساهمات

    14
  • تاريخ الانضمام

  • تاريخ آخر زيارة

آخر الزوار

لوحة آخر الزوار معطلة ولن تظهر للأعضاء

إنجازات حمامه السلام

عضو مساهم

عضو مساهم (2/3)

5

السمعة بالموقع

  1. شكرا على هاي النصيحه بس اني طبقت البرنامج ويطلع خطا بالكود وكنت ما عامله دليت فلذلك صار عندي مشكله بالكود ولهذا اجيت هنا حتى اشوف شنو الخطا الي عندي وشكرا
  2. Write a Name_pairs class holding three members (name, age, size) where name is an array of strings, age is an array of ints, and size is the size of name and age arrays. Write a destructor and constructor that accepts one input argument which the size. Provide an input operation (method) d . read_names that reads a series of names. Provide a read_ages operation that prompts the user for an age for each name. Provide a print operation that prints all the (name[i], age[i]) pairs (one per line) in the order determined by the name array. Provide a sort operation that sorts the name array in alphabetical order and reorganizes the age array to match. Create a C++ program and let user enter 5 names and ages and then use print method to print them. Sort the name array and print it again. Notes: 1- Sort the names in name according to the first character only and sort only for the first five letters. i.e, A, B, C, D, and E. 2- For example, enter the following names: Baraa, Ahmed, Emad, Diaa, and Chloe.
  3. العفو منك استاذ بس اذا ممكن تبعث الي كود الحل الثاني لان من كتبته ما جاي يتنفذ عندما نحذف virtual وشكرا
  4. اي هو هاي السؤال التكمله مالت السؤال السابق شكرا ع الشرح بس اذا ممكن حل هاي السؤال بطريقه ثانيه لان اني اريد الحل مالته بطريقتين وشكرا
  5. 1)Write a C++ program and create an instance of the Base and Derived class. Call all the methods of the two classes (3 methods for the first class and 4 methods for the second class) and print the returned values. Create a pointer of the Base class and initialize it with an address of an instance of the Derived class and use that pointer to call and print the returned value of the get_info() method of the Derived class. 2) How to make the get_info() method a pure virtual.
  6. 1)Write a C++ class and name it Base. The Base class has two constant private fields: one of type string called name and one of type integer called age; and a constructor that accepts two inputs The Base class also has three public methods: get_name() that returns the name field, get_age() that returns the age field, and get_info() that returns the following string (The name is name at the age of age.) 2)-Write another C++ class and name it Derived. The Derived class inherits form the base class. The Derived class has one private field, type, of type string, a public method, get_type(), which returns the type, and a constructor that accepts three inputs. The Derived class also has another public method that overrides the get_info() method, inherited from the Base class, which returns the following string (The name is name (type) at the age of age.)
  7. Write a C++ class and call it SumProd. The SumProd class should have two public fields of type double named a and b and one private field of type double named c. The SumProd class should have default constructor that initializes all its fields to zeros and prints (default SumProd constructor called) and another constructor that initializes all its fields to values other than zero. The SumProd class should also contain a method that returns the sum and of its fields and another method that returns the product and of its fields. Create an instance of the SumProd class and initializes its fields to 2, 4 and 6. Then, print its c field, the sum and product (call the methods you wrote in the class) of its fields.
  8. السلام عليكم بس اذا ممكن حل هاي السؤال في لغه سي بلس بلس Write a C++ class and call it Linear the Linear class should have three fields named x, y, z respectively and a constructor that initializes its fields to zeros and prints (Linear constructor called). Then, write another class and call it Angular. It should have three fields named x, y, z respectively and a constructor that initializes its fields to zeros and prints (Angular constructor called). After that, write a third class and name it geometry_msgs_twist with two fields: linear and angular (the ones you created above) and a constructor prints (Geometry constructor called). The Geometry_msgs_twist class should also have a method that returns the linear speed. (speed= √(vx2+VY2+VZ2. Create an instance of the Geometry_msgs_twist class and print the x field of the Angular class.
  9. Write a c++ function name it isfloat that checks if number is float or not the correct float number comes in any of following. forms -0.584 .258 -.894 0.156 + 0.1253 ask the user to enter two float numbers (check them using isfloet function that you wrote above ) and your program should print the sum and multiplication of the two float numbers .
  10. Function that accept one input argument only the input could be int if the input is integer the function returns its number of digitsWrite a ++c
×
×
  • أضف...