Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void calculateTotal(){
- for(int c = 0; c < shirts.length; c++ ){
- if(shirts[c] != null){
- totalPrice += shirts[c].price;
- }
- }
- }
- public void calculateTotal(){
- for (Shirt shirt : shirts) {
- if (shirt != null) {
- totalPrice += shirt.price;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement