Forums

ForumsProgramming Forum

Programming Class

Posted Jul 31, '12 at 5:17pm

Darkroot

Darkroot

2,879 posts

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.


Yeah I've never come across that before I guess don't use the same name of your classes as predefined classes you are actually using.

12 errors. I'm doing this horribly,


Those are mostly from your System.out.println() don't forget semi-colons and complete strings.

y=ax^2+bx+c;


That won't work and you don't need it, try using the actual formula and let it do the math. You don't need to write a general polynomial equation. You only need 3 variables for a,b,c and one or two more for x,y if you want to hold them or you can just place them in the System.out.println which is a bit messy.
 

Posted Aug 1, '12 at 10:53pm

Darkroot

Darkroot

2,879 posts

Mildly disappointed that only one person has actually finished and another has actual code to show. I'll probably scratch the due dates and make this class open. I'll post exercises here and at some point post the solutions. I'll still respond to emails and posts here normally. I might collect the exercises and format this thing into a programming sticky (hopefully if mods approve of course) for when the new AG will comes out with it's fresh forums.

 

Posted Aug 5, '12 at 11:20pm

maninfrontofthemask

maninfrontofthemask

99 posts

So... do we have another assignment soon?

 

Posted Aug 9, '12 at 1:00am

maninfrontofthemask

maninfrontofthemask

99 posts

Ummm... Darkroot? (bump)

 

Posted Aug 13, '12 at 8:13pm

gunsofliberty

gunsofliberty

28 posts

Is this going to be scheduled to another time?

 

Posted Aug 13, '12 at 9:52pm

Darkroot

Darkroot

2,879 posts

I have finals now so that's the reason for my non-responsiveness. Next assignment should be out Wednesday or Thursday.

For the next assignment do the last assignment if you haven't. Read sections 2.3,2.41,2.44,2.46 and 2.5 will be the last thing we will be covering in chapter 2.

 

Posted Aug 15, '12 at 9:13am

Txsl

Txsl

5 posts

I just think I`m pretty strange with the Aciton Script style of coding. I`m learning C++ in University, now I can make codes of template( easy one, of course ) But I really don`t understand AS. And when I try to make a SC2 map with trigger I found something in common. Is that a right way to understand Flash programming?

 

Posted Aug 22, '12 at 10:29pm

Darkroot

Darkroot

2,879 posts

@Txsl the best way to learn something psychologically, is to apply the knowledge and tie it to whatever you already know.

Next assignment is using text I/O or scanners make a program that takes the users first name, last name, age and initial balance print out a string saying "Hello (first name) + (last name) your current balance is (double + increment by one using incrementation "shortcut&quot.

For assignment 3 do the exercise question in chapter 2, 2.1-2.4, not 2.5 unless you want to but I won't be covering that section yet.
Then do the practice quiz. All the solutions are posted on the site.

Assignment 4 part 1 will consist of upgrading assignment 2 to output &quotlease enter correct input" and not stop execution unless so sort of input is received. This will require both a while loop and and if/else statement with a control Boolean value that will be able to end the while loop if the user inputs correct values.

 

Posted Aug 27, '12 at 9:24am

maninfrontofthemask

maninfrontofthemask

99 posts

k Assignment 2 questions:

-What do you mean by balance? (like a bank account balance?)
-The program I would think would only output the once so wouldn't the incrementation always be 1 (or an interest rate?), therefore you really don't need a variable for it.
-If the incrementation is a interest rate then the interest rate wouldn't increment, it would compound, which is way different cause when you compound "shortcut" will not change

Maybe I am way off base I just wanted to clear up the assignment

 

Posted Aug 31, '12 at 12:11am

Darkroot

Darkroot

2,879 posts

-What do you mean by balance? (like a bank account balance?)
Yes, probably should of made that more clear.

-The program I would think would only output the once so wouldn't the incrementation always be 1 (or an interest rate?), therefore you really don't need a variable for it.


Just the value the user gives you in balance that is incremented by one using the shortcut. That's for you to decide.
 
Reply to Programming Class

You must be logged in to post a reply!