هذا السؤال لاحظت وجوده ظمن الاسئلة المرسلة من قبل الاعضاء ولكن هل يمكنكم مساعدتي بالحل بطريقة جديدة افيدوني رجائاً
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)
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.
السؤال
Aya alsalam
السلام عليكم
هذا السؤال لاحظت وجوده ظمن الاسئلة المرسلة من قبل الاعضاء ولكن هل يمكنكم مساعدتي بالحل بطريقة جديدة افيدوني رجائاً
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)
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.
4 أجوبة على هذا السؤال
Recommended Posts
انضم إلى النقاش
يمكنك أن تنشر الآن وتسجل لاحقًا. إذا كان لديك حساب، فسجل الدخول الآن لتنشر باسم حسابك.