File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Cattle Drive and the fly likes About assignment java-1b(hundred) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "About assignment java-1b(hundred) " Watch "About assignment java-1b(hundred) " New topic
Author

About assignment java-1b(hundred)

kamabotti khan
Greenhorn

Joined: Jul 13, 2010
Posts: 22
what to learn or know about to do assignment java 1b since i am not understanding
how to implement things so that the console should 80 characters wide.

Thank You
Gary Ba
Ranch Hand

Joined: Oct 23, 2009
Posts: 150

Try playing around with module (%) and see how this can help you. Look it up and see how that can help you. There might be some other way of doing this but I would try that first.

Good Luck!
Gary


star chaser..
Carol Murphy
village idiot
Bartender

Joined: Mar 15, 2001
Posts: 1195
Since the console has space for exactly 80 characters, use that knowledge to rewrite assignment 1 so that no matter what name is used for the argument, that name will print completely each time, and if it does not fit entirely, will print on the the next line instead of being split into 2 halves.
(Hint: use your math skills)
Gary Ba
Ranch Hand

Joined: Oct 23, 2009
Posts: 150

Carol,
wait is my start up the wrong way to do it?

=)
Carol Murphy
village idiot
Bartender

Joined: Mar 15, 2001
Posts: 1195
Gary, sometimes the solution to a relatively simple problem remains elusive even after one gets a few good hints. I'm not sure exactly what Kamabotti has tried, but from my own experience with this one, the fact that the console was 80 characters wide was news to me. (I have no formal computer background) Using this knowledge, along with basic math skills, I was eventually able to hash out a solution. It took me a few tries, and really made me aware that I had to learn to approach these programming assignments from a direction I was not accustomed to taking!
All hints are of value, as long as they don't just give the answer away completely. Learning to think a little about the approach to a problem is good, and if you can't come up with a good approach, then just jump in and start writing something. The things that don't work may teach you something as well!
paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20528
    ∞

The word is "modulo"


permaculture Wood Burning Stoves 2.0 - 4-DVD set
Gary Ba
Ranch Hand

Joined: Oct 23, 2009
Posts: 150

The word is "modulo"


Thanks Paul!
Carol Murphy
village idiot
Bartender

Joined: Mar 15, 2001
Posts: 1195
paul wheaton wrote:The word is "modulo"



Errrr...., missed that little nicety!
Must not have been wearing my glasses that day!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: About assignment java-1b(hundred)