Ask Question
18 November, 12:11

Create a class called Home that contains 4 pieces of information as instance variables: county (datatype string), street (datatype string), housenumber (datatype int), state (datatype string).

+4
Answers (1)
  1. 18 November, 15:25
    0
    class Home / / create class Home

    {

    / / instance variable declaration

    string county; / / variable county of string datatype

    string street; / / variable street of string datatype

    int housenumber; / / variable housenumber of int datatype

    string state; / / variable state of string datatype

    }

    Explanation:

    Here we declared a class 'Home ' which consist of 4 instance variable.

    The instance variable are declared inside the class. We declared variable county, street, state as string type and housenumber as integer type.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Create a class called Home that contains 4 pieces of information as instance variables: county (datatype string), street (datatype string), ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers