/** This is the shell of code to practice with variables * * @author J. Borland (change to your name) * @version 4.19 **/ public class PracticeVariables { //This method is to allow you to practice printing public static void practicePrinting() { echo ("test printing"); } //This method is to practice with variables public static void practiceVariables() { } //This method is to practice with methods with one parameter public static void findSquare(int x) { System.out.println("The code for this method needs to be added."); } //This method below is to practice with methods with parameters //You need to multiply the 2 numbers and print the product (nicely) public static void multiplyNumbers (int x, int y) { System.out.println("The code for this method needs to be added."); } //This method below is to find the next 2 numbers and print them out. (so if they put in 12, it will print 13 and 14 are the next numbers public static void findNextNums (int x) { System.out.println("The code for this method needs to be added."); } //This method below is to change some amount of money from US to Canadian //Currently the exchange rate is 1 US dollar = 1.32 Canadian dollars //So 8 us dollars = 8*1.32 public static void changeToCanadian (double usCurrency) { System.out.println("The code for this method needs to be added."); } //This method below is to change some amount of money from Canadian to US //Currently the exchange rate is 1 US dollar = 1.32 Canadian dollars //So 8 can dollars = 8/1.32 public static void changeToUS (double canCurrency) { System.out.println("The code for this method needs to be added."); } //This method will find the circumference given the radius and output that to screen public static void findCircumference(int radius) { System.out.println("The code for this method needs to be added."); } //This method finds the average of 2 numbers - careful. public static void findAverage(int number1, int number2) { System.out.println("The code for this method needs to be added."); } //Convert the celsius to fahr - F=9/5*C+32 public static void findFahr(double celsius) { System.out.println("The code for this method needs to be added."); } //*********************************************************************************************************// //ALL BELOW Extra credit (required for hot shots) //*********************************************************************************************************// //Use the quad formula to find both roots and print them out. //Look up quad formula if you forgot it. //To do square root, its Math.sqrt(the number) //For example double theSqRtOf25 = Math.sqrt(5); public static void findRoots(int a, int b, int c) { System.out.println("The code for this method needs to be added."); } //Find the total cost of an item below if tax rate is 5% like in Maine //So if the price was 100 it might say: //The tax is $5 and the total is $105 public static void findTax(double price) { System.out.println("The code for this method needs to be added."); } //Find the total cost of an item below given a price and tax rate //So if the price was 100 and the tax rate was 7% it might say: //The tax is $7 and the total is $107 public static void findTax(double price, double taxRate) { System.out.println("The code for this method needs to be added."); } //*********************************************************************************************************// //Super Advanced - you will need loops, look them up. //*********************************************************************************************************// //Finds the least common multiple of x and y public static void findLCM(int x, int y) { System.out.println("The code for this method needs to be added."); } //Prints all the primes up to and including x public static void findPrimes(int x) { System.out.println("The code for this method needs to be added."); } //The following 2 are just for printing faster public static void echo (String x){ // System.out.println(x); } public static void echo (int x){ System.out.println(x); } }