This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.*; | |
| public class sqrt { | |
| public static void main(String[] args) { | |
| System.out.println("Hello!"); | |
| int sqrtNum = 27; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.ualbany.hw1.problem2; | |
| import java.util.*; // Use a Wildcart import statement | |
| public class HW1Problem2 { | |
| public boolean multiple(int one, int two) { | |
| if (one%two == 0) { | |
| return true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.*; | |
| public class SqrtBabylonianMethod { | |
| private double numberOfSqrt; | |
| private double sqrtGuess; | |
| private double errorTolerance; | |
| public SqrtBabylonianMethod(double numSqrt, double sqrtGuess, double error) { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.ualbany.hw1.problem3; | |
| public class Address { | |
| private String line1, line2, city, state, zipCode; | |
| public Address(String line1, String line2, String city, String state, String zipCode) { | |
| this.line1 = line1; | |
| this.line2 = line2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package edu.albany.hw2.stock; | |
| public class Stock { | |
| private double previousClosingPrice; | |
| private double currentPrice; | |
| private Symbol symbol; | |
| public Stock(Symbol name) { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //package 213Debugging; | |
| // for debugging, here's an online calculator: | |
| // http://www.bluebit.gr/matrix-calculator/matrix_multiplication.aspx | |
| public class Main { | |
| public static void main(String[] args) | |
| { | |
| // matrix multiplication requires that matrix1 to have the same number of rows as matrix2 has columns and vice versa |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package edu.albany.hw2.MorseCode; | |
| import java.util.*; | |
| public class MorseCode { | |
| // Morse Code, A to Z. | |
| StringBuffer morseString = new StringBuffer(); | |
| private String englishWord; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package edu.albany.hw2.car; | |
| import java.util.*; | |
| public class Odometer { | |
| private FuelGauge carTracker; | |
| private double mileage; | |
| private double incrementer; | |
| public Odometer(double mileage, FuelGauge carTracker) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package edu.albany.hw2.car; | |
| import java.util.*; | |
| public class Odometer { | |
| private FuelGauge carTracker; | |
| private double mileage; | |
| private double miles; | |
| private double incrementer; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package edu.albany.hw2.car; | |
| import java.util.*; | |
| public class Car { | |
| public static void main(String[] args) { | |
| FuelGauge one = new FuelGauge(0); | |
OlderNewer