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
public class DistanceApprox{ | |
public String name; | |
//public double inches; | |
public double feet; | |
public DistanceApprox(String name, double feet){ | |
this.name = name; | |
//this.inches = inches; | |
this.feet = feet; | |
} |
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
public class Distance{ | |
public double bigTriangleWidth; | |
public double bigTriangleLength; | |
public double bigTriangleAngle; | |
public double robbersXCoordinate; | |
public double robbersYCoordinate; | |
/* | |
* Constructor sets the robber's X and Y coordinates from input. | |
* @ param - input representing the robbers X and Y coordinates. |
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.Scanner; | |
public class DistanceCalculations { | |
public static void main(String[] args){ | |
Scanner input = new Scanner(System.in); | |
double bigTriangleWidth; | |
double bigTriangleHeight; | |
double bigTriangleAngle; | |
double bigTriangleHypotenus; | |
double smallTriangleHypotenus; | |
double smallTriangleWidth; |
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
/** For this assignment you will write an assembly language function (in 32-bit | |
* mode) to manipulate a 2-dimensional array that represents an image. The image | |
* is a bitmapped image, where (at least for the images we will be working with) | |
* each pixel is represented by 3 bytes that indicate how much red, green, and | |
* blue there is at that location. | |
* @author: Diego Diaz | |
* Course: COMP B13 | |
* Created on: Dec 4, 2015 | |
* Source File: twoDprocessFloat.s | |
*/ |
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
public class FizzBuzz{ | |
public static void main(String[] args){ | |
for(int i = 1; i <= 100; i++){ | |
/* | |
* Could check to see if i is divisible by 5 and 3 first | |
* that way you won't have to check if it's divisible by 3 | |
* and not also divisible by 5 and vice versa. | |
if(i % 3 == 0 && i % 5 != 0){ |
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
int findMatchingChars(char *string1, char *string2, char *outString); | |
#include <stdio.h> | |
int main(int argc, char**argv){ | |
char outString[30]; | |
int count; | |
if(argc <= 2){ | |
printf("Usage: matchCharsMain string1 string2"); | |
} | |
else{ | |
count = findMatchingChars(argv[1], argv[2], outString); |
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
#include <iostream> | |
#include <sstream> | |
using namespace std; | |
int main(int arc, char* argv[]){ | |
string phrase; | |
string words[20]; | |
cout << "Enter in a sentence to be translated into piglatin." << endl; | |
getline (cin, phrase); |
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
/* | |
* Tester program | |
* @author: Diego Diaz | |
* Created on: Sept 06, 2015 | |
* Source File: bottlesOfBeer.cpp | |
*/ | |
#include <iostream> | |
#include <sstream> | |
using namespace std; |
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
/* | |
* Tester program | |
* @author: Diego Diaz | |
* Created on: Aug 23, 2015 | |
* Source File: | |
*/ | |
#include <iostream> | |
#include <sstream> | |
#include <string> |
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
/* | |
* | |
* @author: Diego Diaz | |
* Course: COMP B12 | |
* Created on: Apr 23, 2015 | |
* Source File: | |
*/ | |
#include <iostream> | |
#include <string> |
NewerOlder