Answer:
// C++ program to demonstrate inheritance
#include <iostream>
using namespace std;
// base class
class Animal {
public:
void eat() {
cout << "I can eat!" << endl;
}
void sleep() {
cout << "I can sleep!" << endl;
}
};
// derived class
class Dog : public Animal {
public:
void bark() {
cout << "I can bark! Woof woof!!" << endl;
}
};
int main() {
// Create object of the Dog class
Dog dog1;
// Calling members of the base class
dog1.eat();
dog1.sleep();
// Calling member of the derived class
dog1.bark();
return 0;
}
Answer:
dominance
Explanation:
i just took it and got it right
Answer:
several personnel accessing the registration system
Explanation:
batch processing is all about multiprogramming so I think the first answer is the best as it is not based on one person .I know the last answer might be almost close but on a closer look it is not the answer as it is single based as written a file
Answer:
Java.
Explanation:
public class Card
{
String Suit;
int value;
public Card(int value, String Suit) {
self.value = value;
// Check Suits value
if ((Suit == "hearts") || (Suit == "spades") || (Suit == "clubs") || (Suit == "diamonds"))
self.Suit = Suit;
else {
Suit = "none";
throw new IllegalArgumentException("no card of this type exists.");
}
}
public String getSuit() {
return Suit;
}
public int getValue() {
return value;
}
public void print() {
System.out.println("%d of %s", value, Suit);
}
}
public class Deck {
}