Listing 1210 Job Entryjava

package com.msi.manning.UnlockingAndroid; import android. os . Bundle; <—O Bundle class import public class JobEntry {

private String _j obid=""; < | Each member private String _status = ""; Q is a String

/ / members omitted for brevity private String _producturl = ""; private String _comments = "";

// get/set methods omitted for brevity © toString method public String toString() { <-'

return this._jobid + ": " + this._customer + ": " + this._product;

public String toXMLString () { <-1 toXMLString

StringBuilder sb = new StringBuilder(""); Q method sb.append("<j ob>");

sb.append("<id>" + this._jobid + "</id>");

sb.append("<status>" + this._status + "</status>");

sb.append("<customer>" + this._customer + " </customer>");

sb.append("<address>" + this._address + "</address>") ;

sb.append("<city>" + this._city + "</city>");

sb.append("<state>" + this._state + "</state>");

sb.append("<zip>" + this._zip + "</zip>");

sb.append("<product>" + this._product + "</product>");

sb.append("<producturl>" + this._producturl + "</producturl>") ;

sb. append("<comments>" + this._comments + "</comments>");

0 0

Post a comment