Question: Given the class below, you create an object in your main program called myObject, what is the best way to output the street address value?
Given the class below, you create an object in your main program called myObject, what is the best way to output the street address value?
class Address
private string streetAddress
private string city
private string state
private string zipCode
public setAddressaddr returns nothing
this.streetAddress addr
public string getAddress returns string tmp
tmp this.streetAddress
endclass
Group of answer choices
Put streetAddress to output
Put myObject.getAddress to output
Put myObject.streetAddress to output
Put myObject.setAddress to output
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
