All pastes #938918 Raw Edit

Unnamed

public text v1 · immutable
·published 2008-03-11 22:57 UTC
rendered paste body
//Name: Nicholas Brinley
//Date: 3/10/08
//Class: 53 A
//Purpose: To make an online shopping cart application, header file.

#ifndef HW6_H
#define HW_H

#include <iostream> 
using namespace std;

struct couch //define couch parameters
{
  float m_couchWeight;
  bool m_hasResident;
  string m_pattern;
};

struct block //define block parameters
{
  string m_blockSize;
  string m_blockCondition;
};

struct dog //define dog parameters
{
  short m_age;
  bool m_houseTrained;
  string m_smell;
};

struct receipt // receipt parameters
{
  string m_name;
  string m_couchTotal;
  string m_blockTotal;
  string m_dogTotal;
};
void greeting(); // show greeting to user

int menu(); //display menu

//find info for couches to be purchased, and set as purchased
void couches_order(int & total, const float COST_COUCH, couch & couch_order,
                 const float OPPOSSUM, float & num_couches, float& couch_total);

//find info for blocks and set as purchased
void blocks_order(int & total, const float COST_BLOCK, float & num_blocks,
                     const float COST_HALFBLOCK, block & block_order,
                     float & block_total);

//find info for dogs to be purchased and set as purchased
void dogs_order(int & total, float COST_DOG, float HOUSETRAINED,
               float SKUNKSMELL, dog & dog_order, float & num_dogs,
               float & dog_total);

//Set 
void couch_details(couch & couch_order);

float block_details(block & block_order, const float COST_BLOCK,
                    const float COST_HALFBLOCK);

float dog_details(dog & dog_order, const float COST_DOG, const int HOUSETRAINED,
                  const int SKUNKSMELL);

void make_receipt(receipt receipt, const couch couch_order, 
          const block block_order, const dog dog_order, const short num_couches,
          const short num_blocks, const short num_dogs, const float couch_total,
          const float block_total, const float dog_total, const float total);

#endif