Computer Applications
Differentiate between private and protected visibility modifiers.
Related Questions
Why can't every class be termed as user defined data type?
Differentiate between static data members and non-static data members.
Differentiate between instance variable and class variable.
Define a class Calculate to accept two numbers as instance variables. Use the following member methods for the given purposes:
Class name — Calculate
Data members — int a, int b
Member methods:
void inputdata() — to input both the values
void calculate() — to find sum and difference
void outputdata() — to print sum and difference of both the numbers
Use a main method to call the functions.