Questions: 11 448

Answers by our Experts: 10 707

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

For the given code you task is to to implement the following:

1)destructor LList::~LList ()



struct Node {

int data;

Node *next;

class LList {

public:

LList(); ~LList();

private:

Node *head;

int size;

};

LList::LList ()

{

head = NULL;

size = 0; }



class List

{

  public:

  int item;

  int pos=0;

  List* nextNode;

};

void Insert_Element(List** head, char data)

{

  List* node = new List();

  node->item = data;

  node->nextNode = (*head); 

  (*head) = node; 

}


 void PrinList(List *node){

  List *temp = node;

  while(temp !=NULL){

  cout<<temp->item<<" ";

  node->pos ++;

  temp = temp->nextNode;

}

cout<<"\n";

 }


int Length(List *node){

return node->pos;

}


bool is_Empty(List *node){

if(node->pos==0){

return true;

}

else {

return false;

}

}


void Copy_List(List*node, List *list){

List * temp = node;

while(temp !=NULL){

int data = temp->item;

Insert_Element(&list, data);

temp = temp->nextNode;

}

cout<<"The copied list is:\n";

PrinList(list);

}


note:

Create constructor(default,parameterized and copy) and a manu of test the functions.


Prepare a c++ program

 board[4][3] = { {2,3,1},{15,25,13},{20,4,7},{11,18,14}};

              

                                    


Prepare a c++ program of the two-dimensional array of the sample run below:


Sample Run:

              [0]         [1]        [2]     [3]        [4]        [5]

  [0] 

  [1] 

  [2] 

  [3] 

  [4] 

  [5]                    9.5

  [6] 

  [7] 

  [8] 

  [9] 

  [10] 

  [11] 


Write a program to assign the values to base class members at the time of creation of derived class object. The base class members are private members. Display the values of both base and derived class using function overriding concept.


Consider the list of integers (4,5,6,7,8) and we are implementing this list using an Array.

Do the following operations on the given list in C++ language:

·        Add(9): Using Add() to add an element 9 between 6 and 7.

·        Next(): Using Next() to move current pointer 1 shift to the right.

·        Remove(): To remove an element 7.

·        Length(): To return size of the list.

·        find(7): traverse the array until 7 is located.


Consider the list of integers (4,5,6,7,8) and we are implementing this list using an Array.

Do the following operations on the given list in C++ language:

·        Add(9): Using Add() to add an element 9 between 6 and 7.

·        Next(): Using Next() to move current pointer 1 shift to the right.

·        Remove(): To remove an element 7.

·        Length(): To return size of the list.

·        find(7): traverse the array until 7 is located.


Write a program that can be used to assign seats for a commercial airplane. The airplane has 13 rows, with six seats in each row. Rows 1 and 2 are first class, rows 3 through 7 are business class, and rows 8 through 13 are economy class.

Use two parallel arrays:

  • a one-dimensional array to store the row number of the seats (Row #)
  • a two-dimensional array of 13 rows and 6 columns to store the seat assignments (*) and seat letters (A-F)

Your program must prompt the user to enter the following information:

  • Reserve a seat (Yes (Y/y) or No (N/n))
  • Assign ticket type (first class (F/f), business class (B/b), or economy class (E/e))
  • Select desired seat (1-13 and A-F)

Your program must contain at least the following functions:

  • a function to initialize the seat plan.
  • a function to show the seat assignments.
  • a function to show the menu to assign a seat.
  • a function to assign and select your desired seat.
  • a function for each ticket type that determines if a seat is occupied and if that class is full .

Name Surname Score 1. Sam Williams 60 2. John Phoenix 85 3. Simon Johnson 75 4. Sarah Khosa 81 5. Mat Jackson 38 6. Nick Roberts 26 7. Isaac Wayne 74 8. Anna Mishima 34 9. Daniel Rose 64 10. Aaron Black 83 11. Jack Mohamed 27 12. Kathrine Bruckner 42 Create a C++ program that has 3 Stacks. Insert, into the first stack, all the data above (which is the data of student’s names, surnames and the marks they obtain in a particular assessment) Display the content of the stack on the screen (console) Then, remove all the students whose surname starts with the alphabets ‘R’, ‘J’ and ‘M’, from the first stack and insert them into the second Stack. Display the contents of Stack1 and Stack2. Finally, remove all the students whose marks are less than 50 from both Stack1 and Stack2 and insert them into the Third Stack. Display the contents of all the 3 Stacks. 


jbm manufacturing company plans to give a year end bonus to each of its employee consider the following conditions: if the employee's monthly salary is less than or equal to 2,000 pesos, the bonus is 50% of the salary for employees with salaries greater than 2,000 pesos the bonus is 1,500 pesos print the name, salary, and corresponding bonus for each employee


LATEST TUTORIALS
APPROVED BY CLIENTS