(For students familiar with XML) Suppose a class A's purpose in life is to convert an object of another class B into textual form for storage to a file. Suppose there are 3 parts to objects of class B that we will call "var", "const", and "virtual". Class A will convert these parts into Strings and enclose them in tags of the form
public String convertVar() { String result = " "; / /...convert rest of var part of B... result += " "; return result; } public String convertConst() { String result = " "; //...convert rest of const part of B... result += " "; return result; } public String convertVirtual() { String result = " "; //...convert rest of virtual part of B... result += " "; return result; }
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.