Closed Thread Icon

Topic awaiting preservation: Java + Newbie + Homework = Teh Suq Pages that link to <a href="https://ozoneasylum.com/backlink?for=13047" title="Pages that link to Topic awaiting preservation: Java + Newbie + Homework = Teh Suq" rel="nofollow" >Topic awaiting preservation: Java + Newbie + Homework = Teh Suq\

 
Author Thread
Rekabwerb
Nervous Wreck (II) Inmate

From: Weddington, NC, US
Insane since: Jan 2004

posted posted 02-04-2004 14:41

If anyone would like to help me with my java homework (would be greatly appreciated)...

1.) Figure out how to use the Vendor class from the SnackBar applet (without making any changes to it) for adding several integers. Write a console application that prompts the user to enter integers, one at a time, and adds entered positive numbers separately and negative numbers separately. When the user enters a zero, the program displays both sums and exits. The + and - operators are not allowed in the program (except + for concatenating strings). Use the EasyReader class for entering numbers. The numbers may be entered within a do-while loop, as follows:

int n;
...
do
{
... // Display the prompt
... // Read the next number n
if (n < 0 )
...
else if (n < 0)
...
} while (n != 0);

... // Display the two sums


here is the site for the files: http://skylit.com/disks.html


~Sh** happens, wear a diaper

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 02-04-2004 15:01

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

Nimraw
Paranoid (IV) Inmate

From: Styx
Insane since: Sep 2000

posted posted 02-04-2004 15:03

Methinks you'll get a better answer if you:

a) Show / Tell people your progress so far
b) Explain exactly what you want help with, since noone will do your whole homework for you.
c) All of the above



Aww.. InI, you beat me to it....

[This message has been edited by Nimraw (edited 02-04-2004).]

Rekabwerb
Nervous Wreck (II) Inmate

From: Weddington, NC, US
Insane since: Jan 2004

posted posted 02-04-2004 15:04

http://skylit.com/javamethods/studentdisk.zip

in chapter 8

thanks for the help, i dont even know where to start with this, i already tried lookin through our book, but it sucks, and so does the teacher. Most of us went and baught java for dummies 8)

~Sh** happens, wear a diaper

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 02-04-2004 15:13

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

Rekabwerb
Nervous Wreck (II) Inmate

From: Weddington, NC, US
Insane since: Jan 2004

posted posted 02-04-2004 15:29

System.out.println("") is what we've been using for that kind of stuff. Your code looks like what's in the book to. I dont know enough about java to help you help me do this. I should probably just get tutoring or somethin

~Sh** happens, wear a diaper

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 02-04-2004 15:46

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

Rekabwerb
Nervous Wreck (II) Inmate

From: Weddington, NC, US
Insane since: Jan 2004

posted posted 02-04-2004 15:54

heh well im in the class right now so i cant really take much time to figure it out since i gotta pay attention to all the new stuff getting piled on my dome today. Ill be on tonight with more time, hopefully I'll be able to figure something out. Thanks for trying to help though heh

~Sh** happens, wear a diaper

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 02-04-2004 16:17

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

synax
Maniac (V) Inmate

From: Cell 666
Insane since: Mar 2002

posted posted 02-04-2004 18:42

It sounds to me like you just haven't spent enough time studying and trying to learn the basics. I mean, your assignment is extremely basic and clearly intended to get you guys used to Java's syntax and how it works.

I'd just like to add some personal advice for you as well - Don't rely on others to help you. You need to help yourself. I remember the first 3 programming courses that I took in University (Java I, II & III). There were two seperate classes (for each course) for Java I and II - mine, and another one which was taught by a prof notorious for holding all his students' hands, aka everyone gets a good mark regardless of how much Java they actually know. So while my class took the time to learn how to program Java, the other class was basically given a skeleton for every assignment where they had to fill in the blanks. So while they were laughing at the fact that our class *actually* had to do work, we were learning the language and they were just doing the assignments to get by.

When Java III finally came around, we were all in a single class. Myself and my buddy who were in the other Java I and II classes got A+s for all three Java courses. The people who were previously laughing at how "easy Java was" basically all failed Java III because they didn't even know the basics.

So my point is - first learn how to understand Java (it's really quite a smart language and great for novices to learn how to program with) and then the assignments will seem childishly easy for you.

Practice, practice, practice. If you are stuck with a certain aspect of Java and can't find the answers, then we'll help you. But like InI said, we're not going to do your assignment for you.

Good luck.

"Nothin' like a pro-stabbin' from a pro." -Weadah

Rekabwerb
Nervous Wreck (II) Inmate

From: Weddington, NC, US
Insane since: Jan 2004

posted posted 02-06-2004 02:31

what code would i need to make the console app use the EasyReader class

~Sh** happens, wear a diaper

Rekabwerb
Nervous Wreck (II) Inmate

From: Weddington, NC, US
Insane since: Jan 2004

posted posted 02-06-2004 14:46

public class HomeTest
{
public int (sumpos, sumneg);
{
int n;
do
{ Easyreader console = new Easyreader();
System.out.print("Enter your Number.");
n = console.readint....01();
if (n>0)
{
sumpos = sumpos.add(n);
}
else if (n<0)
{
sumneg = sumneg.add(n);
}
{
while (n != 0)
System.out.print("Positive Number" +sumpos+ "Negative Number" +sumneg)
}
}

~Sh** happens, wear a diaper

« BackwardsOnwards »

Show Forum Drop Down Menu