|
-
February 17th, 2010, 04:19 AM
#3
Re: Basic Java Programming Question
There are a lot of errors in this code, I will list them:
1. You are referencing non static data members in a static way. Either make them static, or instantiate an object of the type RentalDialog and access that objects fields.
2. You have mismatched { }. Fix these. Correctly formatted code will help identify these types of problems.
3. Your case statements fall through. Look up case statements, and the role the "break" keyword plays.
4. DVDCOST is not defined.
5. You have unread variables. Defining total, and then setting it, but never reading it, does no good, and is bad style.
Last edited by DavidFongs; February 17th, 2010 at 04:21 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|