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

Compute the total quiz and average quiz of three (3) scores. Determine if the average score is greater than or equal to 70, if TRUE , display Remarks is “ PASSED” otherwise display “FAILED”.

Note:


Only diagram needed no code



TASK:


Head->5->3 - >7 - >9 - >1 - >Null


Draw a diagram of the above list after the following lines of code have been executed:


Node * prev = head ->next;


Node* nodeToInsert = new Node;


nodeToInsert-> data = 4;


nodeToInsert -> next = prev -> next;


prev -> next = nodeToInsert;

For this assignment, students are required to implement a word counting program in C++.


The program should accept the name of a text file as command line arguments (arguments to main) and then perform the following tasks:


Implement a special word counter linked list. Each node of the list will contain following:


next pointer : pointer to next element in the list


previous pointer : pointer to previous elements in the list


character: the data value (char)


words : a pointer to a linked list containing words starting from the character (the data value).



Read the strings from the file (separated by spaces). Identify the starting character (alphabet) of the word (string).


Store the word in the words linked list of the node corresponding to the starting alphabet.


At the end, you should end up with a linked list, with alphabets (a-z) for example, with each node also containing a pointer to another linked list that has all the words starting from the alphabet.

Creating a recursive function can be accomplished in two steps.

  • Write the base case -- Every recursive function must have a case that returns a value without performing a recursive call. That case is called the base case. A programmer may write that part of the function first, and then test. There may be multiple base cases.
  • Write the recursive case -- The programmer then adds the recursive case to the function. 

The following illustrates a simple function that computes the factorial of N (i.e. N!). The base case is N = 1 or 1! which evaluates to 1. The base case is written as  if (N <= 1) { fact = 1; }. The recursive case is used for N > 1, and written as else { fact = N * NFact( N - 1 ); }.




Define a Person class containing Name, Age and Id as attributes and constructor, parameterized


constructor, setters, getters, display as member functions.Student – containing program and cgpa as data-members and constructor, parameterized


constructor and setters, getters and display as over-ridden functions Course – containing title, creditHours and prerequisite as data members. Constructor,


parameterized constructor, setters, getters, and display as member function. Relate this class


with Student class (student is registered into a course).


In main( ), create a pointer of the Person class and use it to create different types of persons


(staff, student and faculty). If the Person is a student and is registered in a course, display


function must display all the details of that student.




Write a C++ program which should implement a binary search tree using link list. User will provide values as input. Your program should create two Binary Search Tree objects and take values in both of the trees. Now pass the objects to a function which will display the intersection (common nodes) of two trees. Note: Function must be iterative.


Implement a C++ program to store Strings in Binary Search tree. Your program should have following functions:

 Insert

 Display

 Search







Create a Binary Search Tree of user defined values. Keep asking user values until he/she enters any negative number. Now display the elements of the tree in In-order, Post-order and Pre-order form. Your program should also contain a search function which should find a particular number entered by user. Search function should be recursive.


Provide the C++ implementation of the following.


               The Person class has name and age as its attributes. It has an overloaded constructor to initialize the values and appropriate accessor and mutator methods. The Employee class has name of the employer and wage as its attributes with an overloaded constructor and appropriate accessor and mutator methods.



write a complete program that defines two functions that demonstrate the difference of the parameter passing methods as specified below, each of which simply triples the variable count defined in main. Then compare and contrast the two approaches. These two functions are





a.) function tripleByValue that passes a copy of count by value, triples the copy and returns the new value and





b) function tripleByReference that passes count by reference via a reference parameter and triples the original value of count through its alias (i.e., the reference parameter).







In the main function of the program,





assign any desired value to the variable that will be used as an actual parameter in the function call.





display the value of the actual parameter or argument before and after the function call. Do this for both functions.

LATEST TUTORIALS
APPROVED BY CLIENTS