The base class in the following statements is the vehicle class.
<h3>What is a base class?</h3>
A base class is also known as a parent class.
A parent class is the existing class from which the other classes are determined and properties are inherited.
The class car is the child class. The child class inherit the properties of the parent class or the base class.
Therefore, the base class is the vehicle class.
learn more on class here; brainly.com/question/14293976
#SPJ11
Answer:
The algorithm is as follows:
1. Input sentence
2. Input character
3. Length = len(sentence)
4. count = 0
5. For i = 0 to Length-1
5.1 If sentence[i] == character
5.1.1 count++
6. Print count
7. Stop
The program in C++ is as follows:
#include <iostream>
#include <string.h>
using namespace std;
int main(){
char str[100]; char chr;
cin.getline(str, 100);
cin>>chr;
int count = 0;
for (int i=0;i<strlen(str);i++){
if (str[i] == chr){
count++;} }
cout << count;
return 0;}
Explanation:
I will provide explanation for the c++ program. The explanation can also be extended to the algorithm
This declares the string and the character
char str[100]; char chr;
This gets input for the string variable
cin.getline(str, 100);
This gets input for the character variable
cin>>chr;
This initializes count to 0
int count = 0;
This iterates through the characters of the string
for (int i=0;i<strlen(str);i++){
If the current character equals the search character, count is incremented by 1
if (str[i] == chr){ count++;} }
This prints the count
cout << count;
Dns stands for : domain name system
It works because people translate domain names to IP addresses so browsers can load internet resources.
Answer:
The question given is incomplete as it does not contains the image. I have found the image of the question and it is attached below.
The solution of the question is also attached below in the image.
I hope it will help you!
Explanation:
Answer:
- public static void main(String[] args) {
- printErrorDescription(14);
- }
-
- public static void printErrorDescription(int value){
- //some codes
- }
Explanation:
Given a function <em>printErrorDescription() </em>with one parameter (Line 5 - 7). To call the function, we can write the function name and place the value of 14 within the parenthesis (Line 2). The value of 14 is a function argument. The value of 14 will be processed within the function to meet some purposes.