Answer:
I'm unsure of what language you are referring to, but the explanation below is in Python.
Explanation:
a = int(input("Input your first number: "))
b = int(input("Input your second number: "))
c = int(input("Input your third number: "))
maximum = max(a, b, c)
print("The largest value: ", maximum)
Answer:
i honestly believe that its type over mode, hope it helps
Explanation:
Answer:
Encapsulation:-It is the binding of the data and functions so that they works as one unit.
Inheritance:-When one class acquires the property of another class it is called inheritance.
Polymorphism :-It generally means more than one form
Explanation:
Encapsulation:- class is an example of encapsulation it can hold different data types and functions in a single container called class.
class Name{
public:
string first_name;
string last_name;
void Display()
{
cout<<first_name<<" "<<last_name<<endl;
}
};
Inheritance:-The property of a class acquiring the properties of another class is called inheritance.
Now we will inherit the above defined class.
class person: public Name
{
public:
char gender;
int age;
void Display()
{
cout<<first_name<<" "<<last_name<<gender<<age<<endl;
}
};
int main()
{
Name n;
person p;
n.Display();
p.Display();
}
Polymorphism- There are two types of polymorphism:-
1.Run time polymorphism=The values are decided at run time.
2.Compile time polymorphism=The values are decided at compile time.
Example:-In the above example we have function Display() in both the classes.This is an example of compile-time polymorphism. We are deciding at the time of compilation which display to use.
Shell programs are computer programs designed to run on the Unix/Linux shell
The shell program where comments are used to explain each line is as follows:
#This gets input for NAME
read NAME
#This gets input for AGE
read AGE
#This gets input for USN
read USN
#This gets input for GENDER
read GENDER
#This prints the name
echo "Name: $NAME"
#This prints the age
echo "Age: AGE"
#This prints the usn
echo "USN: USN"
#This prints the gender
echo "GENDER: $GENDER"
#The following if condition determines, if the user is eligible to vote or not
if [ $USN -gt 50 ] then
echo "You are not eligible"
else
echo "You are eligible"
Read more about computer programs at:
brainly.com/question/13795586