grimFandingo
Member-
Posts
14 -
Joined
-
Last visited
Awards
This user doesn't have any awards
grimFandingo's Achievements
-
Yeah Physics has a lot of formula work, but not pure mathematics. That apprenticeship at BAE looks really good, you did well getting that. Good luck with your job.
-
No I do A-Levels, just non mathematics related subjects, so my maths is a bit rusty. I am doing Computing, Physics and English.
-
I am from the UK. I am in year 13(second year of college) and am going to university in September 2014. I am 18, I am not sure what the US equivalent of that is. Why?
-
I'm experienced in the meth game. I have been around long enough to no longer need help regarding meth.
-
It did, thank you.
-
You are correct, I had that answer I just wrote it wrong in the post. Anyway thanks for clearing that up for me, I understand now. I really appreciate your help.
-
So I am brushing up my maths skills, ready for my CompSci degree next year. I am able to multiply algebraic expressions and factorize them and all of that good stuff, however there is one part that is confusing me. That would be powers(or indices) Take the equation Factorize: 2a²b³ + 3a³b² - 6a²b² = I know the answer is: a²b²(2ab + 3a - 6) I understand most of except the powers. Why is a²b² * 2ab = 2a²b³, I don't understand where the ³ comes from? What is the rule with powers when multiplying equations and factorizing. Any help would be great
-
I just deleted some of the parameters and it worked, thanks man!
-
Hi I am making a simple Decimal to binary converter with a simple GUI in Java; However I seem to have hit a snag that I hope one of you will be able to help with. Main Class: import javax.swing.JOptionPane;import javax.swing.JFrame;import java.awt.*;import javax.swing.*;public class mainClass{ static int decimal; public static void main (String[]args){ //Input Box String decimal =JOptionPane.showInputDialog(null, "Please Enter a Number: ", "Decimal to Binary Converter", JOptionPane.PLAIN_MESSAGE); textBox.createWindow(); }} GUI Class import javax.swing.JOptionPane;import javax.swing.JFrame;import java.awt.*;import javax.swing.*;public class textBox { public static void createWindow(){ JFrame frame = new JFrame("Decimal to Binary Converter"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JLabel textLabel = new JLabel(mainClass.decimal + " In Binary is -> " + Integer.toString(mainClass.decimal, 2, SwingConstants.CENTER)); textLabel.setPreferredSize(new Dimension(300, 100)); frame.getContentPane().add(textLabel, BorderLayout.CENTER); frame.setLocationRelativeTo(null); frame.pack(); frame.setVisible(true); }} on the JFrame textLabel decolarion line above, I get the following error: "the method toString (int, int) in the type integer is not applicable for the arguments (int, int, int)" I cannot figure out why
-
So I am still plowing through Java trying to learn. I am still a beginner and have a beginners question: I am going through the book 'Java - How to Program' (Great book by the way - thanks @Zonked) I am carefully looking through the exercises and examining what each part does; this but stumps me however: There are two classes, Gradebook and gradebookTest: Gradebook public class Gradebook { public void displayMessage(String courseName){ System.out.printf("Welcome to the gradebook for \n%s!\n", courseName); }//Ends displayMessage method}//Ends Gradebook class gradebookTest import java.util.Scanner;public class gradebookTest { //Main method that begins program execution public static void main(String[]args){ //Creates Scanner input Scanner input = new Scanner(System.in); //Creates an object Gradebook and assigns it to myGradeBook Gradebook myGradeBook = new Gradebook(); //Prompt user for the course name System.out.println("Please enter the course name: "); String nameOfCourse = input.nextLine(); System.out.println(); //Outputs a blank line //Calls the displayMessage method myGradeBook.displayMessage( nameOfCourse ); } //ends main}//ends gradeBookTest clas This part is about learning parameters and arguments The bit that confuses me is how the parameter courseName declared in the displayMessage method is somehow sent to the other class and displays the name of the course entered in the scanner. There is no mention of the courseName variable in the main method I am just stuck as to how it all works; any help would be great. Thanks
-
The Lord of the Rings Trilogy Shawshank Redemption The Butterfly Effect American History X Fight Club
-
Hello, so I am stuck again. package BankAccount; import java.util.Scanner; public class mainClass {public static void main(String[]args){//Create an account methodcreatingAnAccount createAccount = new creatingAnAccount();//Method that shows balancemainMenu showBalance = new mainMenu();//Method that adds funds to your balancemainMenu addFunds = new mainMenu();//Method that adds funds to your balancemainMenu withdrawFunds = new mainMenu();//Method that adds funds to your balancemainMenu threeOptions = new mainMenu();//Method that adds funds to your balancecreatingAnAccount enterCredentials = new creatingAnAccount();Scanner Question1 = new Scanner (System.in);System.out.println("Do you have an account?");String Answer1 = Question1.nextLine();if (Answer1.equals("yes")){ enterCredentials.enterCredentials();}else{ Scanner createAcc = new Scanner(System.in); System.out.println("Do you want to create an account?"); String accCreate = createAcc.nextLine();if(accCreate.equals("yes")){ createAccount.createAccount(); enterCredentials.enterCredentials();}else{ System.exit(0); }} so if they answer yes to wanting to create an account it will take them to this method... public void createAccount(){String username;String password;Scanner enterUsername = new Scanner (System.in);System.out.println("Enter a username: ");username = enterUsername.nextLine();userNames.add(username);Scanner enterPassword = new Scanner (System.in);System.out.println("Enter a password: ");password = enterPassword.nextLine();userPasswords.add(password);} That then adds the scanner input to this arraylist: ArrayList<String> userNames = new ArrayList<String>();ArrayList<String> userPasswords = new ArrayList<String>(); Once there username and password are saved to the array, they will then be asked to re enter them to access the program like so: public void enterCredentials(){mainMenu threeOptions = new mainMenu();Scanner enterUsername = new Scanner (System.in);System.out.println("Please enter your username: ");String username = enterUsername.nextLine();Scanner enterPassword = new Scanner (System.in);System.out.println("Please enter your password: ");String password = enterPassword.nextLine();if(userNames.contains(username) && userPasswords.contains(password)){threeOptions.threeOptions();} after that they should be taken to the threeOptions(); class, however they are not and the program ends there, why is this? I know this is super long and hard to read Thanks
-
Doesn't matter, I used an array and found the answer
-
Thanks guys, my problem is solved; just quickly though, is there a way to run a method only the first time an application is ran then never do it again. It will save the required details and remember them for next time. Is this possible without incorporating a database?
-
Hello everyone; So I have decided to learn Java after many years out of the game (was a C programmer) I already decided I hate the variables system, so I need some help... (Bear in mind this is not the actual code I am using this is just to make it easier) Say I have one variable in a method in a class that is not the main class public void method1(){int a = 1System.out.println(a + 1);} then I want to use it inside another method in the same class public void method2(int a){System.out.println("a + 2") So far this is fine, but here is my issue. When I want to call method2 in my main class I get the error "a cannot be resolved to a variable" Here is what I am doing: I am turning the method into an object and then calling it like I do with methods without parameters: testClass method2obj = new testClass();method2obj.method2(a); I am not sure what to do here, any ideas? Thanks guys
