Skip to content

Instantly share code, notes, and snippets.

View janell-baxter's full-sized avatar

Janell Baxter janell-baxter

View GitHub Profile
@janell-baxter
janell-baxter / LoafDogMachTwo-ITP-02-07-2017.cs
Last active February 16, 2017 20:12
Example with fundamental concepts: datatype, string, double, class, instance, object, method, function, boolean
/*
* LoafDog Mania Mach Two
* Name, 02/07/2017
*
* An example application to show some programming fundamental concepts
* datatype, string, double, class, instance, object, method, function, boolean
* LoafDog idea created by Spring 2017 Introduction to Programming class
*/
using System;
using System;
namespace Try_Catch
{
class Program
{
static void Main()
{
Console.WriteLine("Enter number:");
int number = Convert.ToInt16(Console.ReadLine());
@janell-baxter
janell-baxter / NothingBuntCakes.cs
Created February 16, 2017 20:22
Simple example with object instantiation
using System;
/*
* Example created by the Introduction to Programming Fall 2016 class
* Showing classes, objects, constructors, and other fundamental C# concepts
*/
namespace NothingBuntCakes
{
class Program
{
/*
* 09/07/2017
* Quick console application to review information covered in prerequisite course
* Ask a user/player for profile information (5 questions)
* Use information submitted to print out message
* Reminder of:
* classes (properties and methods)
* constructor
* colored text
* window title
using System;
using static System.Console;
namespace OOPDayTwoReview
{
class Trivia
{
int Score = 0;
//answers player enters
string[] Answers = new string[6];
@janell-baxter
janell-baxter / CatApp01.cs
Created October 10, 2017 21:36
Cat Application 01 (reviewing class relationships)
using static System.Console;
//uses UML from Jeff Meyers
//http://imamp.colum.edu/mediawiki/images/f/f3/CatConainmentAssociation.PNG
namespace CatApp
{
class Mammal
{
protected int Age;
protected bool HasHair;
//Application using example code from C# 5.0 Pocket Reference, page 28
//http://shop.oreilly.com/product/0636920023975.do
using System;
namespace UmbrellaWizard
{
class Program
{
static void Main()
{
@janell-baxter
janell-baxter / Bumblebee.cs
Created June 4, 2018 02:06
Introduction to Programming Day Two (Summer 2018) Simple Application Example: Make a Bee!
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DayTwoBumblebee
{
class Bumblebee
{
@janell-baxter
janell-baxter / Game.cs
Last active June 4, 2018 16:07
Study Application Example Framework
using System;
using static System.Console;
namespace StudyApplication
{
class Game
{
public Game()
{
//constructor sets the title of the app and calls the menu
@janell-baxter
janell-baxter / Bakery.cs
Last active June 4, 2018 19:41
Bakery Application (Introduction to Programming, Summer 2018): Using an Array to Store Menu Items
using System;
using System.Globalization;
using static System.Console;
namespace MegaByteBakery
{
class Bakery
{
// Two-dimensional array of menu items
public static string[,] menu = new string[,] { { "Filled Cupcake", "2.00" }, { "Garlic Bread", "1.50" }, { "Pie", "17.38" }, { "Cookie", "1.35" }, { "Fudge Brownie with Vanilla Icing", "2.60" }, { "Cheese Danish", "2.75" }, { "Croissant", "1.40" } };