I've got time - a lot of time - to help people who are learning; it's really rewarding to teach the subjects that we do, and the most rewarding students are those who take the time to go above and beyond the norm in asking questions. So why, when I get an email out of the blue asking for help with a learning project, am I often very reluctant to muck in directly? Here's why - in the form of an answer sent out in the last few minutes ....
I'm always very reluctant to give students advise on their assignments as I don't know what you have been taught so far and what the intent of the assignment was. It would be too easy for my to start using elements of Java that you haven't been taught about yet, and to spoil the way you're learning - that would be very unhelpful in the longer run. If you're having trouble with the assignment, then your teacher or his assistant or your school/college help desk really should be the ones who know how best to help you (and good on you for asking for help).
In particular, I look at your use of switch in the first enclosure and see that you have it go 52 ways - once for each card in the deck. There's a programming paradigm that says "if you find yourself repeating something, there MUST be an easier way of doing it" and indeed that is the case - your code is 10 times longer than it should be BUT ONLY IF you have already been taught things like the loops and arrays you would need to make it shorter .... (and in a real practical solution it should be shorter to cut down on the maintainance issues of a live system)
I would, though, agree that if you feel your teacher doesn't know enough about the subject to be comfortable as he/she teaches it and has no support, you're in a bit of a problem area. Have a look at
http://www.wellho.net/resources/ex.php4?item=j707/ransbury.java
and the other examples in that area of the site as a starter. and that may help you.
Finally, and slightly reluctantly, I have to decline to offer free ongoing support via email to students who ask me for help - especially where I'm given a time limit. It feels a bit like having a gun held to my head. I just don't have the time, the answers to be good are all "one off", and so it's inefficient for me in terms of writing for a bulk of readers, and I'm often off line for a period and couldn't be relied on anyway. I suggest that you follow up your Java through the examples on our site that I have pointed you towards, through the resources that should be provided for your course, and (if you need) through forums such as ours at
http://www.wellho.net/cgi-bin/opentalk/YaBB.pl
And all the best in your studies of Java!
Graham
(written 2007-11-27)
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
J707 - Java - Strings [1557] Trying out our Java examples on our web site - (2008-02-27)
[2649] Length, size or capacity in Java? - (2010-02-24)
[3048] String handling - from first steps to practical examples - (2010-11-13)
[4393] Splitting Java strings and extracting numbers - (2015-01-13)
[4414] Java - converting an integer to a fixed length string - (2015-02-04)
G501 - Well House Consultants - Customer Service [72] On Customer Service - (2004-10-03)
[91] On line every 24 hours - (2004-10-17)
[126] Feedback shows the tip of an iceberg - (2004-11-22)
[150] Confession - (2004-12-13)
[189] Tuesdays and Fridays - (2005-01-25)
[195] Customer service - examples to warn us - (2005-01-30)
[233] Giving customers best value - (2005-03-02)
[265] Business practise, 2005 style - (2005-04-03)
[327] How far should our support go - (2005-05-28)
[350] Want to be one better - (2005-06-17)
[393] Trainer answers phone - (2005-07-28)
[440] Upgrade! - (2005-09-09)
[482] Different ways of selling - (2005-11-01)
[552] Keeping Customers Informed - (2006-01-02)
[566] May all your screw-ups be big ones - (2006-01-16)
[569] Instructions for bright people - (2006-01-19)
[609] Been on a course, but still not got it? - (2006-02-16)
[621] And the staff put the icing on the cake - (2006-02-23)
[628] Active Learning - (2006-02-28)
[650] A person of few words - (2006-03-18)
[717] A customer service company - (2006-05-11)
[725] Better communication - (2006-05-19)
[841] Forum help - a push in the right direction - (2006-08-21)
[852] Eventful evening - a lesson in looking after contacts - (2006-09-02)
[944] Just ******* Google it - (2006-11-25)
[961] Products that our customers want more of - (2006-12-03)
[966] CSL, KISS and RTFM - (2006-12-05)
[1007] Friends and family - (2006-12-25)
[1046] Bounce, bounce, bounce - (2007-01-20)
[1262] Keep in touch with PHP, Perl, Python and old friends too - (2007-07-09)
[1319] Customer feedback - lifeblood of a business - (2007-08-25)
[1434] Market survey - to learn, to prove a point, or to sell your product? - (2007-11-17)
[1516] Pictures you can use - for free - from our library - (2008-01-23)
[1606] Sheep Shearers, Marathon Runners and Ocean Sailors - (2008-04-09)
[1637] Providing exceptional service - and carrying on doing so. - (2008-05-09)
[1835] 23:30 bookings and midnight checkins - (2008-10-12)
[1985] Learning to program as a part of your job - (2009-01-10)
[1991] Rules for a King - (2009-01-13)
[2015] Service Excellence Awards - (2009-01-30)
[2049] Why Choose Well House Consultants for your course? - (2009-02-20)
[2102] What do people think of our Apache httpd / Tomcat course? - (2009-03-24)
[2124] Building down expectations - (2009-04-09)
[2236] Alumni - revisiting and supporting the old University - (2009-06-13)
[2258] Questions I have been asked on answering the phone - (2009-06-26)
[2530] Taking a knock over Santa - (2009-12-08)
[2650] Getting a phone line changed ... - (2010-02-25)
[2880] Getting in touch - Please allow me to see you when you are online - (2010-07-21)
[2961] Initial handling of phone calls and walk in visitors - (2010-09-19)
[3073] Customer Service - the boundary - (2010-11-27)
[3103] Thank you - and Happy Christmas - (2010-12-24)
[3271] The importance of feedback - (2011-04-30)
[3294] It's not just about the jam in the sandwich - (2011-05-19)
[3378] New product - ensuring that supply matches demand - (2011-08-03)
[3808] Can you put names to faces? - (2012-07-19)
[3835] The Information age - not yet truly with us? - (2012-08-12)
[4077] Palty or Parliamentary? - (2013-04-30)
[4078] Train works for me! - (2013-05-02)
[4232] Not wanted here - hotel guests who will not be happy - (2013-12-30)
Some other Articles
Easy selection of multiple SQL conditions from PHPUpgrade Mac OSX to Leopard, Web Server Apache httpd config lostQuestion on division (Java) - Also Perl, PHP, Python ...Refa Tandoori Indian Restaurant, MelkshamAn answer to a student asking 'Help'Looking after you Christmas Customer CrowdsUsing English can slow you right down!Christmas is coming very earlyReading a file multiple times - file pointersOn cancellations, rebooking, and pricing schemes