Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A: Add one drone to end of the list. Prompt for user to enter the new drone info

ID: 3764393 • Letter: A

Question

A: Add one drone to end of the list. Prompt for user to enter the new drone info. I have this so far

droneType addOne () {

droneType one;

cout << " Enter ID: ";

cin >> one.id;

cout << " Enter name: ";

cin >> one.name;

cout << " Enter flight status: ";

cin >> one.flightStatus;

cout << " Enter mission: ";

cin >> one.missionRole;

cout << " Is it armed or unarmed: ";

cin >> one.armed;

cout << " Enter the distance : ";

cin >> one.distance;

return one; }

Explanation / Answer

// Please give more details about the program! What list? and please give existing code if we have to complete some program. I made the drone structure!

struct droneType{
   int id;
   string name;
   string flightStatus;
   string missionRole;
   string armed;
   double distance;
};

droneType addOne () {
   droneType one;
   cout << " Enter ID: ";
   cin >> one.id;
   cout << " Enter name: ";
   cin >> one.name;
   cout << " Enter flight status: ";
   cin >> one.flightStatus;
   cout << " Enter mission: ";
   cin >> one.missionRole;
   cout << " Is it armed or unarmed: ";
   cin >> one.armed;
   cout << " Enter the distance : ";
   cin >> one.distance;
   return one;
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote