Results 61 to 70 of 70
- 05-24-2010, 02:14 PM #61
Senior Member
- Join Date
- May 2010
- Posts
- 112
- Rep Power
- 0
- 05-24-2010, 02:15 PM #62
Senior Member
- Join Date
- May 2010
- Posts
- 112
- Rep Power
- 0
I believe i will understand it.
- 05-24-2010, 02:53 PM #63
Senior Member
- Join Date
- May 2010
- Posts
- 112
- Rep Power
- 0
LJ apart from Lectures videos and the book art and science of Java(eric roberts).What materials do you use.Any suggestion for me to improve my java skills.do you practise alot?
Thank you.
- 05-24-2010, 03:21 PM #64
there is a different version of the book. i think you can find it in a torrent, but i am just using the preliminary Draft version
i think this exercise was also used in a previous stanford intake as a section exercise.
CS106A Handouts
these exercises and handouts are very similar to the ones given in the with the online course zip.
i think thats where i got my initial version from but it is essentially the same as the book but with days added on the top row.
An additional requirement was to have the correct number of rows for the days. So that if February started on a Sunday, you would only have 4 rows
where as if March started on a Saturday you would need 6 rows.
this is my simplified version without the days of the week added.
the OP would do well to compare both methods and note that there is seldom one singular solution
Java Code:public class calendar extends GraphicsProgram { private static final int DAYS_IN_WEEK = 7; private static final int DAYS_IN_MONTH = 31; private static final int DAY_WIDTH = 80; private static final int DAY_HEIGHT = 60; /* (Sunday = 0, Monday = 1, Tuesday = 2, and so on)*/ private static final int DAY_MONTH_STARTS = 5; public void run() { int rows = (DAYS_IN_MONTH + DAY_MONTH_STARTS) / DAYS_IN_WEEK; if ((DAY_MONTH_STARTS + DAYS_IN_MONTH) % DAYS_IN_WEEK != 0){ rows++; } for (int i = 0; i < rows; i++) { int y = i * DAY_HEIGHT; for (int j = 0; j < DAYS_IN_WEEK; j++) { int x = j * DAY_WIDTH; add(new GRect(x, y, DAY_WIDTH, DAY_HEIGHT)); int date = (((DAYS_IN_WEEK * i) + j) - DAY_MONTH_STARTS) + 1; if (date > 0 && date <= DAYS_IN_MONTH) { add(new GLabel("" + date + ".", x + 25, y + 35)); } } } } }
here is a good tutorial that you should consider doing when you get a convienient place in the course.
if you just finished a chapter why not look at it now.
Eclipse and Java for Total Beginners
it more about how to use eclipse than it is about java.
you can download the videos and watch and type along with the example.
you will learn a lot about the functionality of eclipse and it will save you a good deal of typing. its 16 15-minute videos.
You will find that as you progress through 106a you will have to go and find out all sorts of stuff yourself
the sun java tutorials are a good source of reference learning material
The Java™ Tutorials
also the API will prove invaluable as a reference to the many Java classes when you get a little further.
Overview (Java 2 Platform SE v1.4.2)
similar documantation for the acm libraries which are used in 106a can be found here
Generated Documentation (Untitled)Last edited by sonny; 05-24-2010 at 03:32 PM.
:p I still have my "L" plates on...... directions and explanations are far more help than blaring your Horn! :p Watching:CS106a on YouTube \Reading The Art & Science of Java by Eric S Roberts
- 05-24-2010, 04:10 PM #65
Senior Member
- Join Date
- May 2010
- Posts
- 112
- Rep Power
- 0
Thank you Sonny I will go through them.Much obliged mate.
- 05-24-2010, 07:18 PM #66
Senior Member
- Join Date
- May 2010
- Location
- London
- Posts
- 106
- Rep Power
- 0
- 05-24-2010, 07:21 PM #67
Senior Member
- Join Date
- May 2010
- Posts
- 112
- Rep Power
- 0
Cool.I am going through those videos (Mark) too;)
- 05-25-2010, 12:23 PM #68
Senior Member
- Join Date
- May 2010
- Location
- London
- Posts
- 106
- Rep Power
- 0
I wonder whether now is a good time for you to be going through those Mark Dexter videos.
Are you understanding them?
- 05-25-2010, 12:31 PM #69
Senior Member
- Join Date
- May 2010
- Posts
- 112
- Rep Power
- 0
Well...is it quite early to go through those at the moment.
- 05-25-2010, 12:35 PM #70
Senior Member
- Join Date
- May 2010
- Posts
- 112
- Rep Power
- 0
Similar Threads
-
CS106A Stanford University
By Learning Java in forum New To JavaReplies: 116Last Post: 07-09-2011, 04:43 PM -
Need help with java question
By ccie007 in forum New To JavaReplies: 23Last Post: 05-18-2010, 06:32 PM -
Java question
By TGH in forum New To JavaReplies: 12Last Post: 11-27-2009, 02:05 PM -
question about java rmi
By hakimade in forum Advanced JavaReplies: 1Last Post: 07-01-2009, 07:15 AM -
Java Question
By Jay-1.1 in forum New To JavaReplies: 11Last Post: 05-01-2008, 04:04 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks