Write a new class named “VariableString” that must inherit from the "Variable" class. This class manages a variable name (string), description (string) and a value (string). Please note that this class must make use of inheritance. The class must at least provide the following methods: - toString() method that can return a string in the following format:    VAR() DESC() VALUE()  such as VAR(greeting) DESC(a welcome message) VALUE("Hello, World!") - override the "contains" method so that it not only searches through the name and description but also the value of the string

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter10: Introduction To Inheritance
Section: Chapter Questions
Problem 6RQ
icon
Related questions
Question

in c++

Write a new class named “VariableString” that must inherit from the
"Variable" class. This class manages a variable name (string), description (string) and a
value (string). Please note that this class must make use of inheritance.

The class must at least provide the following methods:
- toString() method that can return a string in the following format:
   VAR(<var-name>) DESC(<var-desc>) VALUE(<var-value>)
 such as VAR(greeting) DESC(a welcome message) VALUE("Hello, World!")
- override the "contains" method so that it not only searches through the name and description but also the value of the string.

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,