Expert Answers

(Solved):   Solve the following systems using Gauss Seidel Ite...

Solve the following systems using Gauss Seidel Iteration Method.
1521 -42, +523 = 180
42 +4422 + 16x3 = -85
4x1 + 10x2 + 24x3

 

Solve the following systems using Gauss Seidel Iteration Method. 1521 -42, +523 = 180 42 +4422 + 16x3 = -85 4x1 + 10x2 + 24x3 = 215 DE

(Solved): Question 3 Discuss the concept of pointers, arrays and dy...

Question 3
Discuss the concept of pointers, arrays and dynamically allocated memory by
answering the following questions.
(a)

The class MyBook has two data members:
An integer, numofBooks, represents the mimber of books.
A dynamic location large enoug

Question 3 Discuss the concept of pointers, arrays and dynamically allocated memory by answering the following questions. (a) Assume the following definition and initialisation: int mtdArray[7] = {6, 8, , 1, 7, 5, 3}; What output does each of the following statements produce? Explain your answer (6) (1) cout << mtdArray[3] << endl; (11 cout << mtdArray[2] + mtdArray[4] << endl; (11) cout << mtdArray[mtdArray[4] - mtdArray[3]] << endl; (7 marks) Write C++ statements to carry out the following tasks: Declare a variable c and assign it the character 'M'; Declare a variable pChar as a char pointer; Make pChar point to the location where c is Increment c by 1 and store the result in the location where pChar is pointing What is the ouput when the statement below is executed? cout << *pChar << endl; (6 marks) The class MyBook has two data members: An integer, numofBooks, represents the mimber of books. A dynamic location large enough to store the titles of a collection of books. The size of the collection is determined by numoiBooks. The location is referenced by the pointer string* tities. (1) Define MyBook class with the appropriate data members, constructor and destructor (9 marks) (11) Write a main function to demonstrate how a Mybook instance can be created (3 marks)

(Solved): In the evaporator of a heat engine, CO2 enters as saturated ...

In the evaporator of a heat engine, CO2 enters as saturated liquid-vapor mix at P1=4MPA, x1 = 0.2 and then is isobarically evaporated and heated to T2 = 10?. Heat is drawn at a rate of 2kW. Determine the mass flow rate through the evaporator (ignore kinetic and potential energies)

(Solved):   Determine the equation of the isogonal trajectorie...

Determine the equation of the isogonal
trajectories of the curves
Y = cea
=
TT
if the angles of the intersection are 4 radian

 

Determine the equation of the isogonal trajectories of the curves Y = cea = TT if the angles of the intersection are 4 radians. .

(Solved): A simple beam 10m in length with overhanging member at the...

A simple beam 10m in length with overhanging member at the left end 2m in length. Analyze the beam using
influence lines if h

A simple beam 10m in length with overhanging member at the left end 2m in length. Analyze the beam using influence lines if highway loads are 116KN(concentrated) and 9.35KN/m (uniformly distributed) 1. Compute the length of the beam where the uniformly distributed load can produce positive shear (maximum) at the midspan of the beam. 2. Determine the length of the beam where uniformly distributed load can produce negative shear(maximum) at midspan 3. compute maximum shear at midspan of beam if concentrated load is applied at the overhang.

(Solved): The common tangent BC of a reversed curve is 600m too long a...

The common tangent BC of a reversed curve is 600m too long and has a bearing of S45°E. AB is tangent of the first curve whose bearing is N70°E while CD is a tangent of the second curve whose bearing is N30°E. A is the point of curvature while D is the point of tangency. If the degree of the curvature at D is 4°,

find the stationing of PC if PRC is at sta 16+420.

(Solved): Required information A laser has a wavelength of 594 nm. A...

Required information
A laser has a wavelength of 594 nm. A grating and a lens are used to split the beam into three parallel

Required information A laser has a wavelength of 594 nm. A grating and a lens are used to split the beam into three parallel beams spaced 1.85 cm apart If the slit spacing is 1.00 um, what focal length lens should be used?

(Solved):   I want to answer in less than an hour and get a hig...

lai 0.5
?????? 28
Using a Nyquist rate of 4 times the maximum frequency instead of 2 times will result in a better
approximat

 

I want to answer in less than an hour and get a high rating

lai 0.5 ?????? 28 Using a Nyquist rate of 4 times the maximum frequency instead of 2 times will result in a better approximation of the signal ZRO lbs (B

(Solved):   Please assist urgently One eigenvalue of the matr...

One eigenvalue of the matrix
11 10
1 2
is 12. What is the corresponding eigenvector?
O
(19)
(1)
O
O
? ––– –
O

 

Please assist urgently

One eigenvalue of the matrix 11 10 1 2 is 12. What is the corresponding eigenvector? O (19) (1) O O ? ––– – O

(Solved): In this assignment, you will be creating a binary search tre...

In this assignment, you will be creating a binary search tree (BST). The tree will be storing words ( Strings). You will need to define a BSTNode class, which is similar to the Node class you implemented in previous lectures. BSTNode will be used to store an item of type String. It will also contain references to its left and right subtrees. The BSTNode constructor will initialize the item to a value and the left and right nodes to null. BSTNode should be defined as an inner class inside of BinarySearchTree . The fields of BSTNode are: ? String item ? BSTNode left ? BSTNode right The BinarySearchTree class itself only has one field, the root of the BST. The constructor for the BinarySearchTree only has to set the root to null . We will be using a Queue to store elements from traversals. That is, instead of preorder, inorder and postorder traversals printing out the elements of the tree, they will each return a Queue containing the elements in that order. You can use The Queue class implemented in previous lectures or just use the Queue class from the java library. You will be implementing the following methods for your BST: ? public boolean isEmpty () Returns true if BST is empty, false otherwise ? public Queue inOrder () Returns a queue with the elements in-order 2 ? public Queue preOrder () Returns a queue with the elements in pre-order ? public Queue postOrder () Returns a queue with the elements in post-order ? public boolean contains (String s) Returns true if the BST contains the string, otherwise returns false.In this assignment, you will be creating a binary search tree (BST). The tree will
be storing words (Strings)
You will need t

In this assignment, you will be creating a binary search tree (BST). The tree will be storing words (Strings) You will need to define a BSTNode class, which is similar to the Node class you implemented in previous lectures. BSTNode will be used to store an item of type String. It will also contain references to its left and right subtrees. The BSTNode constructor will initialize the item to a value and the left and right nodes to null. BSTNode should be defined as an inner class inside of Binary Search Tree. The fields of BSTNode are: • String item • BSTNode left • BSTNode right The Binary Search Tree class itself only has one field, the root of the BST. The constructor for the Binary Search Tree only has to set the root to null. We will be using a Queue to store elements from traversals. That is, instead of preorder, inorder and postorder traversals printing out the clements of the tree, they will each return a Queue containing the elements in that order. You can use The Queue class implemented in previous lectures or just use the Queue class from the java library You will be implementing the following methods for your BST: • public boolean isEmpty o Returns true if BST is empty, false otherwise . public Queue inOrder 0 Returns a queue with the elements in order 1 • public Queue preOrdero Returns a queue with the elements in pre-order public Queue postOrder o Returns a queue with the elements in post-order . public boolean contains (Strings) Returns true if the BST contains the string, otherwise return false