/*
 * The purpose of this program for students to get familiar in programming in Java and introducing
 * them to objects and graphics of Java through Java's built-in APIs and Libraries (Java SE or JDK 8 
 * (1.8)). Furthermore, we also introduce the students to importing packages for the using the
 * Java's libraries and APIs as previously mentioned.
 * 
 * Professor: Carol Ramsey
 * CS 312: Introduction to Programming (Java)
 * 3.2 Methods that return values
 */

import java.awt.Graphics;
import java.util.Scanner; 
import java.lang.Math;

public class ReturnsObjectsExamples {
//////////////////////// 3.2 Methods that Return Values
/* ====================================
   public static void main(String[] args) {
		Math.pow(3,  4);
		System.out.println (Math.pow(2, 4));
		double result = Math.pow(2, 5);
		System.out.println (result);
	}
*/		
/* ====================================
	public static void main(String[] args) {
		double squareRoot = Math.sqrt(121.0);
		System.out.println(squareRoot);           

		int absoluteValue = Math.abs(-50);
		System.out.println(absoluteValue);       

		System.out.println(Math.min(3, 7) + 2);   
	}
*/		
	 
/* ====================================
  	public static void main(String[] args) {
  		double a = -1.9;
		double b = 2.25;
		System.out.print(Math.floor(a) +
			" " + Math.ceil(b) + " " + a);
	}
*/		
/* ====================================
  	public static void main(String[] args) {
		System.out.println (Math.abs(-1.23));
		System.out.println (Math.pow(3, 2));
		System.out.println (Math.pow(10, -2));
		System.out.println (Math.sqrt(121.0) - Math.sqrt(256.0));
		System.out.println (Math.round(Math.PI) + Math.round(Math.E));
		System.out.println (Math.ceil(6.022) + Math.floor(15.9994));
		System.out.println (Math.abs(Math.min(-3, -5)));
	}
*/		

/* ====================================		
  	public static void main(String[] args) {
  		double grade1 = 97.8234;
		int grade2 = (int)grade1;
		System.out.println ("grade1 = " + grade1);
		System.out.println ("grade2 = " + grade2);
		
		double result1 = (double) 19 / 5;
		double result2 = 19 / 5;
		System.out.println ("result1 = " + result1);
		System.out.println ("result2 = " + result2);
	}
*/		
/* ====================================	
  	public static void main(String[] args) {	
 		System.out.println ("Your birthday as a double is: " + bdayTrick(8, 19));
		System.out.println ("Your birthday as a double is: " + bdayTrick(2, 27));
		System.out.println ("Your birthday as a double is: " + bdayTrick(6, 19));
	}
	    // Accepts two ints, month and day of your birthday.
	    // Returns your birthday as a decimal number.
	    // For example, sending August 19 to the method (8, 19), returns 8.19
		private static double bdayTrick(int month, int day) {
			double magicNum = 7;
			magicNum *= month;
			magicNum -= 1;
			magicNum *= 13;
			magicNum += day + 3;
			magicNum *= 11;
			magicNum -= (month + day);
			magicNum /= 10;
			magicNum += 11;
			magicNum /= 100;
			return (magicNum);
		}
*/
/* ===================================

	public static void main(String[] args) {
		double slope = getSlope(0, 0, 6, 3);
    	System.out.println("The slope is " + slope);  
	}

	public static double getSlope(int x1, int x2, int y1, int y2) {
		double dy = y2 - y1;
		double dx = x2 - x1;
		double result = dy / dx;
		return result;
	}
*/
/* ====================================
	public static void main(String[] args) {
		int x = 5;
		int y = 7;
		System.out.print(m(x, y) + " " + x + " " + m(y, x));
	}
	
	public static int m(int x, int y) {
		x += 2;
		System.out.print(x + " ");
		y -= 2;
		return (x * y);
	}
*/	
/* ====================================
 	public static void main(String[] args) {
	    slope(0, 0, 6, 3);
	    System.out.println("The slope is " + result);  
	}
	public static double slope(int x1, int x2, int y1, int y2) {
		double dy = y2 - y1;
  		double dx = x2 - x1;
	   	double result = dy / dx;
	  	return result;
	}
*/
/* =========================================
	public static void main(String[] args) {
		System.out.println ("Displacement is " +
				displacement(3.0, 4.0, 5.0));
		System.out.println (Math.pow());
	}

	public static double displacement(
			double v0, double a, double t) {

		double d = v0 * t + 0.5 * a * Math.pow(t, 2);
		return d;
	}
*/	
////////////////////////////////////////////////////////3.3 Using Objects

	
	
/*	// Scanner Blueprint
	public static void main(String[] args) {
		Scanner console = new Scanner(System.in);
		System.out.print("How old are you? ");
    	int age = console.nextInt();
    	int years = 65 - age;
    	System.out.println(years + " years until retirement!");
    	
    	//console. This line should be removed unless teaching another syntax error
	    console.close();
	}
*/	

	
} // End of the Class
