Ask Question

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. 9 July, 07:42
    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?
Find 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 the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers