Skip to content

Instantly share code, notes, and snippets.

View ebba0194's full-sized avatar

Bree Therkildsen ebba0194

  • Ambaum Labs
  • Seattle, WA
View GitHub Profile
/*Write a class IntSet for modeling sets of integers in the range 0 through 99. A set should be represented internally as an array of type bool: The ith array element will be true whenever integer i is in the set and will be false whenever integer i is not in the set. Include a no-argument constructor that initializes a set to the so-called “empty set,” i.e., a set whose array representation contains all false values.The program should allow for up to ten sets to be created during a given program run. Use any stand-alone functions you feel necessary.*/
#include <iostream>
using namespace std;
class IntSet
{
public:
IntSet();
@ebba0194
ebba0194 / Intro to Classes~ Improved
Created March 14, 2018 01:06
Classwork; Overloaded Operations with Complex Numbers
#include <iostream>
#include <cmath>
using namespace std;
class Complex{
public:
Complex();//constructor
Complex(float, float);
void getInput();//get user input of complex number
void convertNum(float, float, float);//convert a real number (r) to complex number (r+0i)
#include <iostream>
#include <cmath>
using namespace std;
class Complex{
public:
Complex();//constructor
addComp(Complex&, Complex, Complex);//addition of complex members
subComp(Complex&, Complex, Complex);//subtraction of complex numbers
multComp(Complex&, Complex, Complex);//multiplication of complex numbers
@ebba0194
ebba0194 / 2.1 SHAPES
Created February 6, 2018 21:40
Homework- Modular overloaded functions to calculate area and perimeter of circle, rectangle and triangle.
#include <iostream>
#include <cmath>
using namespace std;
const long double pi = 3.141592654;
void getDim (float&);
void getDim (float&, float&);
void getDim (float&, float&, float&);
#include <iostream>
#include <string>
using namespace std;
string province(string);
int main(){
string city, abbrev, prov;
cout<<"Enter city: ";
#include <iostream>
using namespace std;
void printRow (int, int);
int main()
{
int nrows;
cout<<"Enter number of rows (>0): ";
#include <iostream>
using namespace std;
void calcInt (double&, double, double, double&);
int main(){
double P, r, wantAmount, years, endBalance;
cout<<"Enter initial deposit: $";
#include <iostream>
using namespace std;
void printRows(int);
int main(){
int nrows;
cout<<"Enter number of rows (>0): ";
#include <iostream>
using namespace std;
double calcInt (double, double, double, double&);
int main(){
double deposit, ratePer, rateDec, endAmount, years, endBalance;
cout<<"Enter initial deposit: $";
#include <iostream>
#include <string>
using namespace std;
string province(string);
int main(){
string city, abbrev, prov;
cout<<"Enter city: ";