Skip to content

Instantly share code, notes, and snippets.

@edhedges
edhedges / Blackjack.cs
Created November 29, 2011 14:20
Blackjack Main code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace HedgesBlackjack
{
class Blackjack
{
private Deck deck = new Deck();
@edhedges
edhedges / Card.cs
Created November 29, 2011 14:26
Card class
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace HedgesBlackjack
{
public enum Suits
{
S = 1, H, C, D
@edhedges
edhedges / Dealer.cs
Created November 29, 2011 14:27
Dealer class
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace HedgesBlackjack
{
class Dealer : Player
{
public Dealer(decimal m) : base(m)
@edhedges
edhedges / Deck.cs
Created November 29, 2011 14:29
Deck class
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace HedgesBlackjack
{
class Deck
{
private int _topCard = 51;
@edhedges
edhedges / Player.cs
Created November 29, 2011 14:29
Player class
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace HedgesBlackjack
{
class Player
{
private decimal _money;
@edhedges
edhedges / User.cs
Created November 29, 2011 14:30
User class
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace HedgesBlackjack
{
class User : Player
{
private int _numWins = 0;
@edhedges
edhedges / main.cpp
Created November 29, 2011 14:41
Fraction Calculator Main code
/**********************************************
* Name: Eduardo Hernandez-Hedges *
* Date: 10/20/2010 *
* Assignment: Project 5: Fractions *
***********************************************
* This project asks the user for two fractions
then asks the user whether they want to add,
subtract, multiply, or divide them. Then it
prints out the correct reduced value *
***********************************************/
@edhedges
edhedges / fraction.cpp
Created November 29, 2011 14:42
Fraction Computation file
/**********************************************
* fraction.cpp: this handles all of the actual
computations done to the fractions. *
***********************************************/
#include <iostream>
using namespace std;
#include "fraction.h"
/**********************************************
* setValues function: this function is pretty
@edhedges
edhedges / fraction.h
Created November 29, 2011 14:44
Fraction Computation Header file
/**********************************************
* fraction.h: this header file has the private
fields used in fraction.cpp and also has the
prototypes for the functions in fraction.cpp. *
***********************************************/
#ifndef FRACTION_H
#define FRACTION_H
/**********************************************
* class Fraction: this class allows us to make
@edhedges
edhedges / Program.cs
Created November 29, 2011 18:22
Simple team randomizer
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Teams
{
class Program
{
static void Main(string[] args)