Q2. Define a class student with static data member and static function:
data members:
static admno integer
static sname 20 character
static totalMarks float
member function:
static Showdata() Function to display all the data members on the screen
Create a class student. Take data members: Student name, Registration Number and Total Marks. Create a function that will perform task student is pass or not in exam. If the student is Pass than it should display grade according to percentage.
This method converts the displayed data into numeric
Make a class in BaraBitKaar. Input two binary number. Sabtract two binary number.
BaraBitKaar Sabtract( BaraBitKaar b);
following example:
BaraBitKaar r;
r= p.sabtract(q); //this is how sabtract is supposed to be used to sabtract p and q. Notice r receives the return which is of type BaraBitKaar.
r.PrintBinary();
List two (2) benefits and two (2) drawbacks of using memory sticks in business establishments. [4 marks ]
Building on previous assignment, make new functions Multiply and Divide in class BaraBitkaar i.e.
BaraBitKaar Multiply(BaraBitKaar b);
void Divide(BaraBitKaar b, BaraBitKaar & quotient, BaraBitKaar & remainder); //Notice that quotient and remainder are returned through parameters (pass by reference).
Every facet of our lives has been affected by the COVID-19 pandemic. Citizens are encouraged to use online platforms at the expense of face-face-face interactions. With specific examples explain how information technology can be used in this challenging times in the following disciplines;
a) Education
b) Government
c) Health Care
d) Science and Engineering and
e) Banking and Finance
Pele needs a program to calculate his bank balance at the end of the month. Get his balance at the beginning of the month and his deposit and withdrawal amounts during the month. Bank costs are fixed at R55.66 per month. Calculate his balance at the end of the month.
Beginning balance:R1502.50
Deposits during the month:R822.00
Withdrawals during the month:R1200.00
Assume variables A, B, C, D, and E are stored in memory locations 100, 101, 102, 103, and 104, respectively. Using any of the sample machine language instructions given in this section, translate the following pseudocode operations into machine language instruction sequences. Have your instruction sequences begin in memory location 50:
(a) Set A to the value of (B x C) – (D x E) (that is A = BC - DE). You can use a MULTIPLY and SUBTRACT command for the multiplication and subtraction, respectively.
(b) Set A to the value of (B + C) – D/E (that is A = B + C – D/E). You can use an ADD and DIVIDE command for the addition and division, respectively.