1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Anna71 [15]
2 years ago
11

Write a program having a concrete subclass that inherits three abstract methods from a superclass. Provide the following three i

mplementations in the subclass corresponding to the abstract methods in the superclass:
1. Check for uppercase characters in a string, and return true or false' depending on if any are found.
2. Convert all of the lower case characters to uppercase in the input string, and return the result.
3. Convert the input string to integer and add 10, output the result to the console.
Create an appropriate class having a main method to test the above setup.
Computers and Technology
1 answer:
hammer [34]2 years ago
3 0

Answer:

C++

Explanation:

using namespace std;

class AbstractClass {

public:  

   virtual bool checkUpperCase(string inputString);

   virtual string lowerToUppercase(string inputString);

   virtual void stringToInt(string inputString);

};

class ConcreteClass: public AbstractClass {

public:

   bool checkUpperCase(string inputString) {

       bool isUpper = false;

       for (int i=0; i < strlen(inputString);  i++) {

           if (isupper(inputString[i])) {

               isUpper = true;

               break;

           }

       return isUpper;

      }

   string lowerToUppercase(string inputString) {

       for (int i=0; i < strlen(inputString);  i++) {

           putchar(toupper(inputString[i]));

       }

       return inputString;

   }

   void stringToInt(string inputString) {

       int convertedInteger = stoi(inputString);

       convertedInteger+=10;

       cout<<convertedInteger<<endl;

   }

};

int main() {

   ConcreteClass cc;

   return 0;

}

You might be interested in
Why do people yeet yeet and ree
DiKsa [7]

Answer:

Cause they are trying to be annoying

Explanation:

Something is wrong with them :)

8 0
3 years ago
Read 2 more answers
What is the best example of an interrogative sentence?
gavmur [86]

Answer:

How many clubs and quilting societies that flourish today have Amish roots?

Explanation:

4 0
2 years ago
Read 2 more answers
Please help asap
NNADVOKAT [17]

Answer:

a. Comparison of if-else and elif:

if else follow as:

If (Condition)

{

In case if condition true, expression in this section executes

}

else

{

In case condition is false, expression in this section executes

}

elif Statement follows as:

If (Condition)

{

In case if condition true, expression in this section executes

}

{

in case, condition is false, move to elif block

elif (Condition)

{

In case elif condition true, expression in this section executes

}

else

{

In case elif condition is false, expression in this section executes

}

}

Explanation:

In if else, program first check the condition in "if statement", if condition is true it move into the body of "if " and execute the expression. If the condition is false it moves to the body of "else" and execute the expression.

elif is another block of condition in If else condition,It works as in "if statement" if the condition is true the program executes the expression of body of "if body". If the condition is false, it moves to another block of "elif", where it again check some other condition found in "elif statement". If the condition of "elif statement" is true it executes the expression of "elif body" otherwise in case of false condition it execute the expression in "else body".

It follows as: if - elif-else

Answer

b. the relational operators

Relation operators are the operators that are need in the expression to establish relationship between different operands of the expression.

Explanation:

In few expressions, their are some operators used to establish or show the relationship between different operands. These operator could be Equal (=), Greater than(>), Less than (<), Greater than equal to (>=) and Less than Equal to (<=).

These operators can be used in conditional statements that are used to check the relationship between operands and values through these operators.

Example

if (a>5)

{

if value of is greater than 5 then body of if will execute.

}

else

{

If value of a is less or equal to 5, this section will execute.

}

5 0
2 years ago
The sections that should be included in your research paper are the _____.
Fiesta28 [93]

Thesis

Intro

Body

Conclusion

5 0
3 years ago
Continuous reboots of a Windows host upon encountering a persistent stop error might be caused by Startup and Recovery configura
SOVA2 [1]

Answer:

True.

Explanation:

Sometimes there comes a problem in computer systems of continuous reboots of a windows this could due to following reasons such as software issues,bad power supply,bad hard drive,hardware issues.

If the issue is from startup and recovery configuration or software you can see it by going in the Control Panel System applet given in the question.

7 0
3 years ago
Other questions:
  • Which keyword should return web pages about guitars and about guitarists?
    11·1 answer
  • Please help me with opinions, ideas, any websites that would help, or chart, article, video, or podcast to help support your pos
    10·1 answer
  • If a user's input string matches a known text message abbreviation, output the unabbreviated form, else output: Unknown. Support
    14·2 answers
  • "The ability to assign system policies, deploy software, and assign permissions and rights to users of network resources in a ce
    7·1 answer
  • What are spreadsheets in a excel workbook called? A. pages B. notepads C.graphs D.worksheets
    10·1 answer
  • Which of the following best describes the purpose of an IP address?
    7·2 answers
  • What is the scope of each variable?
    11·2 answers
  • Type the correct answer in the box. Spell all words correctly.
    6·1 answer
  • How to set Campaign goals?
    11·1 answer
  • Can you prove that the bleu areas are the same please?
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!