Questions: 9 913

Answers by our Experts: 9 913

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

Write a program that reads Final Year Project (FYP) that consist of Viva score and report marks of

5 (five) students to 2-dimensional (2-D) array named student. The elements from the array

must be initialize to 0 during declaration. The overall FYP marks is measured as follows:


FYP marks=(Viva*0.5)+(Report*0.5)


The viva score and overall FYP marks must be stored in the 2-D array. Then, determine the

followings:

(i) Average of FYP marks

(ii) Highest FYP marks

(iii) Lowest FYP marks

(iv) Suppose that FYP Best Presenter Award is given to students with viva score of 80 and

above, determine the number of students that eligible to receive the award

(v) Suppose that FYP Award is given to students with overall FYP marks of 80 and above,

determine the number of students that eligible to receive the award

(vi) Suppose that pass mark for FYP is 60 and above, determine the percentage of the pass

student


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.



LATEST TUTORIALS
APPROVED BY CLIENTS