@maninfrontothemask Yeah I forgot about that part but it is a simple process.

@gunsofliberty I think it is easier just to post things here. I wasn't even sure some of the messages were received on gmail.

@maninfrontothemask Yeah I forgot about that part but it is a [url=http://www.jcreator.com/installation.htm]simple process[/url].\r\n\r\n@gunsofliberty I think it is easier just to post things here. I wasn't even sure some of the messages were received on gmail.

Never specified a timezone or if it follow your mortal clocks. My "today" lasts from 6 am to 6 pm PST it's only 9:30 pm or 21:30 here. :P Anyway the assignment. Will be due by Sunday 6:00 PM or 18:00 PST Make a short program that calculates the Quadratic equation using the values a,b,c which you will instantiate and fill will some numbers. You can assume the user will be reasonable with the inputs (not applicable to real life users are extremely dumb don't trust them, if you let them divide by zero they will). There will be two outputs of the roots that you got in the calculations since quadratic equation has +- applied at the same time thus two answers/roots. The form of the output will be, The first output is, "X" The second output is, /Y/ This assignment will also require you read Section 2.3

So your saying...hmmm im not sure I can post the equation for a regular Quadratic Equation, but do you mean as in using the Quadratic formula to somehow create a program which when the user inputs a quadratic equation it'll display the roots? I think I just dumbed it down for myself...

Anyways, I will be not able to respond over the next following days, since Iam coming back home. Other than that, all I ask is for extra time. I just have enough time to post this message and then get off -_-

[quote]Never specified a timezone or if it follow your mortal clocks. My "today" lasts from 6 am to 6 pm PST it's only 9:30 pm or 21:30 here. :P\r\nAnyway the assignment. Will be due by Sunday 6:00 PM or 18:00 PST \r\nMake a short program that calculates the Quadratic equation using the values a,b,c which you will instantiate and fill will some numbers. You can assume the user will be reasonable with the inputs (not applicable to real life users are extremely dumb don't trust them, if you let them divide by zero they will). There will be two outputs of the roots that you got in the calculations since quadratic equation has +- applied at the same time thus two answers/roots. The form of the output will be, \r\nThe first output is, "X" \r\nThe second output is, /Y/\r\nThis assignment will also require you read Section 2.3[/quote]\r\nSo your saying...hmmm im not sure I can post the equation for a regular Quadratic Equation, but do you mean as in using the Quadratic formula to somehow create a program which when the user inputs a quadratic equation it'll display the roots? I think I just dumbed it down for myself...\r\n\r\nAnyways, I will be not able to respond over the next following days, since Iam coming back home. Other than that, all I ask is for extra time. I just have enough time to post this message and then get off -_-

I probably will have to extend it since I think I need to email a couple of people on the email-list since they probably don't know the assignment here. Also no you got it wrong. When users inputs (changes the vars inside the program no real i/o. Then the quadratic equation program calculates it. It's not very hard you don't even need to understand how the equation works just make the math in the program work. For square roots you will need to read 2.3 and how to perform some of the more complicated math operations in java.

I probably will have to extend it since I think I need to email a couple of people on the email-list since they probably don't know the assignment here. Also no you got it wrong. When users inputs (changes the vars inside the program no real i/o. Then the quadratic equation program calculates it. It's not very hard you don't even need to understand how the equation works just make the math in the program work. For square roots you will need to read 2.3 and how to perform some of the more complicated math operations in java.

So... just to dot the i's and cross the t's. Assignment one is to create a program with values a,b,c to create the standard quadratic equation, y=ax^2+bx+c and then output the x values of the 2 roots (where the y-value is 0) to the standard output. Also referring to your last post a,b,c don't actually have to be inputted, we can just manipulate their values in the program.

Does that sound right? I also tried to relay as much info as I could to the perhaps not mathematically inclined students

So... just to dot the i's and cross the t's. Assignment one is to create a program with values a,b,c to create the standard quadratic equation, y=ax^2+bx+c and then output the x values of the 2 roots (where the y-value is 0) to the standard output. Also referring to your last post a,b,c don't actually have to be inputted, we can just manipulate their values in the program. \r\n\r\nDoes that sound right? I also tried to relay as much info as I could to the perhaps not mathematically inclined students

Yeah that sounds like you understand what you have to do.

If anyone still doesn't understand what is supposed to be done or how to program it don't hesitate to ask.

Yeah that sounds like you understand what you have to do. \r\n\r\nIf anyone still doesn't understand what is supposed to be done or how to program it don't hesitate to ask.

public static void main(String[] args) { int x = 1; int y = 0; int ax = 6; int bx = 3; int c = 2;

y=ax^2+bx+c;

System.out.print( Math.sqrt(x) ); System.out.println ('The first output is, "x") System.out.println ('The second output is, y) } }

12 errors. I'm doing this horribly,

Dark, I'm having some problems, \r\n\r\n\r\npublic class Math {\r\n\r\n public static void main(String[] args) {\r\n int x = 1;\r\n int y = 0;\r\n int ax = 6;\r\n int bx = 3;\r\n int c = 2;\r\n\r\n\r\n y=ax^2+bx+c;\r\n\r\n System.out.print( Math.sqrt(x) );\r\n System.out.println ('The first output is, "x")\r\n System.out.println ('The second output is, y)\r\n }\r\n}\r\n\r\n\r\n12 errors. I'm doing this horribly,

Main method in a math class... interesting... the Math class already exists in Java. Don't know if that's a source of errors or not.

y=ax^2+bx+c;

The syntax is entirely wrong here. to square something, you can't use "^2". I think there's a Math method to do it, but it's usually more efficient to multiply it by itself: y = ax * ax + bx + c; should work. No need for parenthesis because the order of operations holds.

System.out.print( Math.sqrt(x) ); System.out.println ('The first output is, "x") System.out.println ('The second output is, y)

Problems abound here. First of all, you need to use double quotation marks: "" for string literals. Single quotes are for character literals. Now, if you want to print the value contained in x, you can't put it in quotes: then it will print the letter x. Rather, you must concatenate the int x to the string literal with the + operator. Try:

System.out.println( "The first output is " + x );

That code would print this: "The first output is 1

For the next line, you'll do something similar.

System.out.println( "The second output is " + y );

If that doesn't solve your issues and you still get an error, it's probably because you can't pass the Math.sqrt method an integer value. Not sure on that one. If that's causing it to throw an exception, cast it to a double.

This advice won't give you the 100% correct output to dark's instructions: you still need to somehow get the double quotes around the x value and the / around the y. I'm sure Dark or I will help you with that if you need it.

Oh hey Darkroot. Mind if I help you with this a little?

Main method in a math class... interesting... the Math class already exists in Java. Don't know if that's a source of errors or not.\r\n[quote]\r\ny=ax^2+bx+c;[/quote] The syntax is entirely wrong here. to square something, you can't use "^2". I think there's a Math method to do it, but it's usually more efficient to multiply it by itself: y = ax * ax + bx + c; should work. No need for parenthesis because the order of operations holds.\r\n\r\n[quote] System.out.print( Math.sqrt(x) );\r\n System.out.println ('The first output is, "x")\r\n System.out.println ('The second output is, y)[/quote] Problems abound here. First of all, you need to use double quotation marks: "" for string literals. Single quotes are for character literals. Now, if you want to print the value contained in x, you can't put it in quotes: then it will print the letter x. Rather, you must concatenate the int x to the string literal with the + operator. Try:\r\n\r\nSystem.out.println( "The first output is " + x );\r\n\r\nThat code would print this: "The first output is 1\r\n\r\nFor the next line, you'll do something similar.\r\n\r\nSystem.out.println( "The second output is " + y );\r\n\r\nIf that doesn't solve your issues and you still get an error, it's probably because you can't pass the Math.sqrt method an integer value. Not sure on that one. If that's causing it to throw an exception, cast it to a double.\r\n\r\nThis advice won't give you the 100% correct output to dark's instructions: you still need to somehow get the double quotes around the x value and the / around the y. I'm sure Dark or I will help you with that if you need it.\r\n\r\nOh hey Darkroot. Mind if I help you with this a little?

[quote]System.out.println ('The first output is, "x") System.out.println ('The second output is, y)

Also you are missing semicolon's at the end of the lines

[quote]System.out.println ('The first output is, "x")\r\n System.out.println ('The second output is, y)\r\n\r\nAlso you are missing semicolon's at the end of the lines