Skip to content

Instantly share code, notes, and snippets.

View Eldres's full-sized avatar
:electron:
Typing excessively

Josh Nagel Eldres

:electron:
Typing excessively
View GitHub Profile
@Eldres
Eldres / Assignment.txt
Last active September 19, 2015 23:21
Multiply two user inputted vectors
Matrix multiplication: Write a C++ program to compute the product of two matrices.
You are required to use the template class vector to represent a matrix.
Specifically, your program will include the main( ) function and a second function multiply_matrices( ).
The main() function will:
* allow the user to choose the size of the matrices, and subsequently the content of A and B
* call the multiply_matrices() function to compute the product of A and B
* print out the multiplication result.
@Eldres
Eldres / SelectionSort
Last active September 13, 2015 20:50
Implement a C++ program to sort a list of integers using the selection sort algorithm.
#include <iostream>
#include <conio.h>
#include <string>
#include <iomanip>
using namespace std;
const int MAX_SIZE = 100;
void selectionSort(int[], int&);
void readData(int[], int&);
@Eldres
Eldres / ExceptionClass
Last active August 29, 2015 14:10
Poker Game
import java.util.*;
class MyPlayingCardException extends Exception {
MyPlayingCardException (){
super ();
}
MyPlayingCardException ( String reason ){
super ( reason );
}
@Eldres
Eldres / Car
Last active November 27, 2017 23:33
Write a program to simulate the behavior of a self-serve gas station. The goal of this simulation is to collect statistical information of the gas station’s cars and gas pumps. A gas station consists of several pumps and a car waiting line (i.e. a car queue). In each time unit, at most one new car arrives at the gas station. If the car waiting l…
// DO NOT ADD NEW METHODS OR DATA FIELDS!
package PJ3;
class Car {
private int carId;
private int serviceDuration;
private int arrivalTime;
Car() {
/************************************************************************************
*
* Do not modify this file.
*
* LispException class
*
* It is used by SimpleLispExpressionEvaluator
*
*************************************************************************************/