View Single Post
  #19 (permalink)  
Old 05-07-2008, 02:36 AM
Bascotie Bascotie is offline
Member
 
Join Date: Apr 2008
Posts: 77
Bascotie is on a distinguished road
This is what my definition code looks like now using a constructor:

Code:
public class ProjectDefinition { String userNameFirst; String userNameLast; String userPhone; int userFilm; int userPrints; final int USER_EXPOSURES = 1; public ProjectDefinition(String userNameFirst, String userNameLast, String userPhone, int userFilm, int userPrints) { super(); this.userNameFirst = userNameFirst; this.userNameLast = userNameLast; this.userPhone = userPhone; this.userFilm = userFilm; this.userPrints = userPrints; } public String toString() { return "Welcome to Photo World"+ "\n\n" + "First Name:" + " " + userNameFirst + "\n" + " " + "Last Name:" + " " + userNameLast + "\n" + " " + "Phone Number:" + " " + userPhone + "\n" + " " + "Rolls of Film:" + " " + userFilm + "\n" + " " + "Number of Prints:" + " " + userPrints; } }
My problem is changing the controller code to work with it:

Code:
public class ProjectDefinition { String userNameFirst; String userNameLast; String userPhone; int userFilm; int userPrints; final int USER_EXPOSURES = 1; public ProjectDefinition(String userNameFirst, String userNameLast, String userPhone, int userFilm, int userPrints) { super(); this.userNameFirst = userNameFirst; this.userNameLast = userNameLast; this.userPhone = userPhone; this.userFilm = userFilm; this.userPrints = userPrints; } public String toString() { return "Welcome to Photo World"+ "\n\n" + "First Name:" + " " + userNameFirst + "\n" + " " + "Last Name:" + " " + userNameLast + "\n" + " " + "Phone Number:" + " " + userPhone + "\n" + " " + "Rolls of Film:" + " " + userFilm + "\n" + " " + "Number of Prints:" + " " + userPrints; } }
Reply With Quote