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

1. With aid of a diagram, explain the stages the CPU goes through as it executes a 

program. [25 marks] 

2. Give a brief account on the technology used in Flash memory implementation [25

marks] 

3. Explain the start-up process of a computer clearly indicating the purpose of the POST, 

BIOS and CMOS. [25 marks].

4. With aid of a diagram, give a brief explanation on the type of busses available on 

modern computer systems and the purpose of the North Bridge and South Bridge. 

Your diagram should clearly show where the bridges are and what connects them. [25



What are the actual parameter in c++ ?

(1) (a)Define a class Pairs with two integer data members, f and s, where f represents

the first value in the ordered pair and s represents the second value in an ordered

pair. Write a program to test all the overloaded operators in your class definition.


(b) Overload the stream extraction operator >> and the stream insertion operator << as

friend functions so that objects of class Pairs are to be input and output in the

form (5,6) (5,-4) (-5,4) or (-5,-6).


(c) Overload binary operator + as a friend function to add pairs according to the rule

(a,b) + (c,d) = (a + c, b + d)


(d)Overload operator – as a friend function in the same way, i.e. according to the rule

(a,b) - (c,d) = (a - c, b - d)


(e) Overload operator * as a friend function on Pairs and int according to the rule

(a,b) * c = (a * c, b * c)


Consider the following structure used to keep record of a module:

struct Module

{

string moduleName;

string moduleCode;

string lecturer;

int nrStudents;

}

Turn the Module struct into a class. The class should have member variables for all

the values in the corresponding struct. Make all the member variables private.

Include public member functions for each of the following:

 a default constructor that sets the string member variables to blank strings,

and the int member variable to 0;

 an overloaded constructor that sets the member variables to specified values;

 member functions to set each of the member variables to a value given as an

argument to the function (i.e. mutators);

 member functions to retrieve the data from each of the member variables (i.e.

accessors);

Test the class in a program that instantiates an object of class Module. The program should then input values for the object

(obtained from the keyboard), and use the mutators to assign values to the member

variables.


Apply algorithms which perform following operations on Arrays and Linked List.
b. Searching of Elements
i. Linear Searching of Elements
ii. When Linked List is unsorted
iii. When Linked List is sorted
#include <iostream>
#include <cstring>
#include <fstream>
#include <ctime>
#include <conio.h>
using namespace std;
time_t t; // t passed as argument in function time()
struct tm * tt; // declaring variable for localtime()

struct customer{
char phone[22];
char name[20];
char address[50];
};

struct reservation{
int yearday, month, date;
int customerid[20];//note that array index is hotel room number.
};

reservation rese[366];

void addcust(){
// Max Marks 5
//You are required to add customer in a
// customer file with attributes as given in struct customer.
}
The athletics department of a university gives athletes a cash bonus after completing an event as follows:  A bronze medalist gets a 10% cash bonus,  A silver medalist gets a 12% cash bonus and  A gold medalist gets a 15% cash bonus.  All the other athletes get a 5% cash bonus if they are placed among the first 6 athletes. You are requested to write two versions of a program that calculates and displays the final amount that is due, after discount. (i) (ii) Hint: The first version of the program uses a switch statement to implement the above program. The second version of the program uses nested-if statements. Use the following variables: float amount; // the amount that can be divided between the // athletes char athleteCategory;// the medal recieve: 'G' (gold) or // 'S' (silver) or 'B' (bronze) or // 'P'(places) float cashBonus;
A fruit packing company needs to divide a freight of oranges in different quantities according to the size of boxes that must be packed. For example, for South America boxes must contain 36 oranges; for Europe boxes must contain 24 oranges. You are required to write a program to determine the number of boxes as well as the number of oranges left after packing. There are 1256 oranges in the load. The program has the following structure: Declare three int variables nrOranges, nrBoxes, and nrLeft. nrOranges represents the number of oranges in the load, nrBoxes represents the number of boxes packed, and nrLeft represents the number of oranges that is left. Assign the value 1256 to nrOranges.
Write the statement to calculate the number of boxes of size boxSize. Write the statement to calculate the number of oranges, if any are left.
Define a class called Odometer that can be used to track fuel and traveling distance for a car. Include private member variables to track the distance driven (in kms) and the fuel efficiency of the car in kilometers per liter. The class should have a constructor that initializes these values to zero. Include  a default constructor to initialize both member variables to zero,  a member function to reset the odometer to zero kilometers,  a member function to set the fuel efficiency,  a member function that accepts kilometers driven for a trip and adds it to the odometer’s total,  a member function that returns the number of liters of fuel that the car used since the odometer was last reset (this can be calculated using the distance driven and the fuel efficiency), and  a destructor. Use your class with a test program that creates odometers for different cars with different fuel efficiencies. Let the cars do several trips. Reset the odometers at the start of your program.

Define a class Pairs with 2 integer data members, f & s, where f represents 

the 1st value in the ordered pair and s represents the 2nd value. Objects of type Pairs can be used wherever ordered pairs are 

needed.

The class must have a default constructor that initializes data members to 

0, & 2overloaded constructors, 1 with one int parameter and the other with 

2 int parameters. The 1-parameter constructor should initialise the 1st 

member of the pair; the 2nd member of the pair must be 0. The 2-parameter 

constructor must initialise both members of the ordered pair.

The class must have a destructor that outputs 'Bye'

Add accessor functions that return the values stored in each of the member

variables of an object of class Pairs & mutator functions to update each of the member variables of an object of class Pairs

respectively. The class must contain a void member 

function reset() that resets the member variables of a Pairs to values 

specified by parameters.


LATEST TUTORIALS
APPROVED BY CLIENTS