This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Cattle Drive and the fly likes Assignment 5 - Times Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "Assignment 5 - Times" Watch "Assignment 5 - Times" New topic
Author

Assignment 5 - Times

Waria Ahmed
Ranch Hand

Joined: Jul 09, 2008
Posts: 56
Hi everyone,

Just picked up the nerve to attempt this assignment and i am completely baffled. How do i attack this assignment lol?

Any advice would be greatly appreciated.

Thanks
[ July 15, 2008: Message edited by: Waria Ahmed ]
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
Have you read the links in the assignment?


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Daniel Loranz
Ranch Hand

Joined: Jun 17, 2008
Posts: 41
I haven't been "OK-ed" on this one yet. So take the following comments with a grain of salt.

- Are you stuck with the formatting issue, meaning getting the results to line up in neat columns? If so, the "format text" link on the assignment page pretty much walks you through how to do that.

- Are you stuck on generating values for the table? If so, you can create the table using a nested loop. For example ...

for (int i = .... ) // fill in as needed
{
for (int j = ... ) // again fill in as needed
{
// now "ij" can identify individual elements in your table
// for example, the "j-th" column in the "i-th" row.

} // next j
}//next i

Hope this helps.
Waria Ahmed
Ranch Hand

Joined: Jul 09, 2008
Posts: 56
Originally posted by Daniel Loranz:
I haven't been "OK-ed" on this one yet. So take the following comments with a grain of salt.

- Are you stuck with the formatting issue, meaning getting the results to line up in neat columns? If so, the "format text" link on the assignment page pretty much walks you through how to do that.

- Are you stuck on generating values for the table? If so, you can create the table using a nested loop. For example ...

for (int i = .... ) // fill in as needed
{
for (int j = ... ) // again fill in as needed
{
// now "ij" can identify individual elements in your table
// for example, the "j-th" column in the "i-th" row.

} // next j
}//next i

Hope this helps.



I wasnt sure how to attempt this assignment. Although, thanks for the advice, I will attempt this again tonight and report back if i have any troubles.

Any more advice would be helpful though
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11151
    
  16

well, since you're on 5, I assume you know how to write, compile and run a program.

attack this problem like any other. do the minimum each time, then go through a testing process. perhaps start by doing nothing more than printing the header:
<blockquote>code:
<pre name="code" class="core"> 0 1 2 3 4 5 6 7 8 9</pre>
</blockquote>

once you have that working, see if you can print the first line of each row, so you end up with this:

<blockquote>code:
<pre name="code" class="core">
0 1 2 3 4 5 6 7 8 9
0
1
2
3
4
5
6
7
8
9
</pre>
</blockquote>
keep working a little bit at at time, constantly compiling and running after just about every single new line of code you write or change.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Assignment 5 - Times
 
Similar Threads
Info About Assignment Download
web interface to search database
Dreamcar assignment for Part II
Book Of Knowledge(BOK)
Help Please