C++ Answers

Questions answered by 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

Add to the time class hat has separate in member data for hours, minutes, and Seconds the ability to subtract two time values using the overloaded (-) operator, and to multiply a time value by a number of type float, using the overloaded (*) operator.



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


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

BIOS and CMOS.


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


Create a class called DIRECTORY with data members, name and phone number. Use member
functions, parameterized constructor to set the details and display() to print the details. In the
main function, create minimum of 5 objects to get the input and store it. Then, write the details
into the binary file called DIRECTORY.TXT. Fetch the data from the file and display it. Write
a function to search for a record using phone number. Use appropriate functions to display the
result.
Baby Life is a newly founded public clinic. They receive at least 40 maternity patients each day.

Create a C++ program that displays a menu to the user. The menu should have three options, namely (1) save patients details, (2) display patient details and (3) for exiting the program. The program should make use of two functions, addPatient () to add patient details. Use an array to store patient details. Then the second function is display patient () which should display the patient details. Ensure that both functions give an option to either add or display the number of patients to be added or displayed. Also, ensure that the program repeatedly shows the list of options until the point option 3 is selected, which terminates the program.

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.


LATEST TUTORIALS
APPROVED BY CLIENTS