• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Assignment 5 - Times

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Sheriff
Posts: 9099
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you read the links in the assignment?
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
lowercase baba
Posts: 12871
62
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
A wop bop a lu bop a womp bam boom! Tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic