[SOLVED] Using Code Throughout 5 Classes-Stuck
Hey guys,
im remaking this thread to be more specific and organized about what I'd like to know:
So far in my photo center program I can ask for input and have the input broken up into tokens using the string tokenizer, the input is seperated by spaces and assigned correctly to where it should go (almost);
For example,
Homer Simpson 5555555555 8 8
should return
firstName: Homer
lastName: Simpson
etc etc but the problem is when the summary page shows up it is showing the null values rather than what the user inputs.
Heres my "receipt" code:
Code:
public String getReceipt(){
NumberFormat cf = NumberFormat.getCurrencyInstance();
NumberFormat nf = NumberFormat.getNumberInstance();
nf.setMaximumFractionDigits(2);
String summary = "";
summary = "Welcome to PhotoCenter\n\n";
summary += "Your Order ID:";
summary += ++orderId;
summary += "\n";
summary += "-------------------------------";
summary += "\n";
summary += owner.toString();
summary += "\n";
summary += "-------------------------------";
summary += "\n";
summary += "Film Type:";
summary += film.toString();
summary += "\n";
summary += "------------------------------";
summary += "\n";
summary += "Development Cost ($5.00 per roll):";
summary += "\n";
summary += "Printing Cost ($0.10 per print):";
summary += "\n";
summary += "Subtotal:";
summary += "\n";
summary += "Tax (8%):";
summary += "\n";
summary += "Total:";
//==todo== you need to add to this summary
return summary;
owner.toString() and film.toString() are going into my film and customer classes (owner and film are just objects for those classes within the PhotoCenter class) and grabbing the return result.
Problem is my summary is returning
Customer First Name: null
etc for the rest also
If theres any other code I need to show please tell me, I dont want to post everything, people tend to not like that.. =)