Archived

This topic is now archived and is closed to further replies.

Any Programmers out there want to help me with a program for school?

29 posts in this topic

Posted

Then just call your function in your main method with whatever input you feel like. How does he want you to submit this assignment?

he doesnt say .. what I posted was how he wanted the assignment. then wants me to send him the .java file.

Share this post


Link to post
Share on other sites

Posted

Are you using Eclipse?

I don't know why they're still teaching Java.

Share this post


Link to post
Share on other sites

Posted

Yes eclipse. Java is our first language we learn.

Share this post


Link to post
Share on other sites

Posted

Yes eclipse. Java is our first language we learn.

Yea it was our entry language too - I'm just not a big fan of it.

Share this post


Link to post
Share on other sites

Posted

Java is fine for learning to program. It covers the fundamentals like object oriented programming, encapsulation, constructors, etc.. without having to fuss with things like garbage collection, pointers. It is like a gateway drug to the other languages.

Share this post


Link to post
Share on other sites

Posted

lol I have an AS in programming from 10 years ago and we learned C, C++, VB, and some Java...

needless to say my skills are now utterly useless, and as such, mostly forgotten...

Sorry bro, but just looking at that gives me PTSD

1 person likes this

Share this post


Link to post
Share on other sites

Posted

Google is your friend. http://www.abbeyworkshop.com/howto/java/readLine/

I think something like this would work, I've never read from the console in java.

public static void main(String args[]) throws IOException {

BufferedReader consoleIn = new BufferedReader(new InputStreamReader(System.in));

System.out.println("Enter a:");

String a = consoleIn.readLine();

System.out.println("Enter b:");

String b = consoleIn.readLine();

System.out.println("Enter c:");

String c = consoleIn.readLine();

System.out.println("Enter d:");

String d = consoleIn.readLine();

LinearEquation equation = new LinearEquation(a,b,c,d);

if(equation.isSolvable()) {

System.out.println("x = " + equation.getX());

System.out.println("y = " + equation.getY());

} else {

System.out.println("Not solveable");

}

}

Share this post


Link to post
Share on other sites

Posted

Ya i googled it before i posted on here.

Thanks tho i just added a scanner to it anyway.

Oh well.

Share this post


Link to post
Share on other sites

Posted

If you learn perl too, I may have a job for you.

2 people like this

Share this post


Link to post
Share on other sites

Posted

Deal

Share this post


Link to post
Share on other sites

Posted

You'll also have to learn metabolomics, proteomics, and some biostats. Or just look pretty and nod when they talk to you.

OK, just nod.

Share this post


Link to post
Share on other sites

Posted

Are you using Eclipse?

I don't know why they're still teaching Java.

Why do you say that? Java is still king in the enterprise world.

1 person likes this

Share this post


Link to post
Share on other sites