Skip to content

Instantly share code, notes, and snippets.

@ndd12
ndd12 / Drag Calculator (File Manipulation)
Created October 4, 2017 16:47
Read from a data file to calculate the drag on a cube at different times and record values into a different data file created within the program.
//Name: Noah Douglas
//Date: October 4th 2017
//Program Name: DragCalc.cpp
/*
Program Description: We are given a data file for pressure recordings on a cube in water, and using this information we must first determine
if each probe given is for the right or left side, then we calculate the drag by taking the sum of left side values times the given area and subtracting
the sum of the right side times the given area. We then create a data file and write to it each time interval and calculated drag value for each current time.
And finally, we calculate the average drag value for the entire time interval and print this information on the console screen.
Drag Formula: (sum of left side pressure values * area) - (sum of right side pressure values * area)
@ndd12
ndd12 / FriendMeter.cpp
Last active September 11, 2017 13:28
Friendship Compatibility Quiz
//Name: Noah Douglas
//Date: 9/6/2017
//Program name: FriendMeter.cpp
//Program Description: Determine compatability of friendship between myself and whomever takes this quiz about likes and dislikes. Because making friends can be difficult
//Of course, all point values are assigned based on how strong my opinion is in each matter, this quiz is likely not applicable to any other person.
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
@ndd12
ndd12 / MediaLib Looping Arrays Class
Last active March 15, 2017 13:50
Using For and For Each Loops for handling arrays
/**
* Write a description of class ArrayMediaLib here.
*
* @author Noah Douglas
* @version March 15 2017
*/
public class ArrayMediaLib{
public static double getAvg(int[] daysBtwnPurchase)
{
//Noah Douglas
//Cartwright Industries Payroll
//4-7-16
#include<iostream>
using namespace std;
int main()
{
//Noah Douglas
//Crispies Bagel and Bites
//4-7-16
#include<iostream>
#include<string>
using namespace std;
int main()
//Noah Douglas
//Savings Account Calculator
//4-7-16
#include<iostream>
#include<string>
using namespace std;
int main()
//Age Program
//Noah Douglas
//4-7-16
#include <iostream>
using namespace std;
int main()
{
int age;
//Door Prize
//Noah Douglas
#include<iostream>
using namespace std;
int choice;
int main()
{
cout << "Choose what is behind door #1, door #2, or door #3. ";
cin >> choice;
//Noah Douglas
//Delgados Tacos
#include <iostream>
#include <string>
using namespace std;
int main()
{
//Create 10 menu items each menu item will need a price and two other variables to conicide with it.