#include <iostream>
#include <iomanip>
#include <string>
using namespace std;
int main()
{
/*******************************************************************************
* CONSTANTS
* -----------------------------------------------------------------------
* OUTPUT - USED FOR CLASS HEADING
* -----------------------------------------------------------------------
* PROGRAMMER : Programmer's Name
* CLASS : Student's Course
* SECTION : Class Days and Times
* ASSIGNMENT_NUM : Assignment Number (specific to this assignment)
* ASSIGNMENT_NAME : Title of the Assignment
******************************************************************************/
const char PROGRAMMER[] = "Stephanie Tucker";
const char CLASS[] = "CS1A";
const char SECTION[] = "MW: 8-am";
const int ASSIGNMENT_NUM = 6;
const char ASSIGNMENT_NAME[] = "Boolean Expressions";
// Constants
const int OUTPUT = 15;
// Variables
char candidateInfo;
char sexInfo; // IN & OUT - the candidate's sex
int heightInfo; // IN & OUT - the candidate's height information
int weightInfo; // IN & OUT - the candidate's weight information
char acceptableHeight; // IN & OUT - an acceptable height for the candidate
int totalCandidatesApplied; // IN & OUT - the total number of candidate's accepted
int acceptanceNum; // IN & OUT - the number of candidate's accepted
long acceptanceAvg; // IN & OUT - the percent average of candidate's accepted
cout << "**********************************************************\n";
cout << "* PROGRAMMED BY : " << PROGRAMMER << endl;
cout << "* CLASS : " << CLASS << endl;
cout << "* SECTION : " << SECTION << endl;
cout << "* ASSIGNMENT " << ASSIGNMENT_NUM << " : " << ASSIGNMENT_NAME
<< endl;
cout << "**********************************************************\n\n";
totalCandidatesApplied = 0;
acceptanceNum = 0;
cout << left << setw(OUTPUT) << "Please enter the candidate's infromation (enter 'X' to exit). ";
//cin.get(candidateInfo);
//cin.ignore(1000, '\n');
cout << left << setw(OUTPUT) << "\nSex: ";
cin>>sexInfo;
cin.ignore(1000, '\n');
while(sexInfo != 'x' && sexInfo != 'X')
{
cout << left << setw(OUTPUT) << "Height: ";
cin >> heightInfo;
cin.ignore(1000, '\n');
cout << left << setw(OUTPUT) << "Weight: ";
cin >> weightInfo;
cin.ignore(1000, '\n');
cout<<"\n"<<endl;
totalCandidatesApplied = totalCandidatesApplied + 1;
if(sexInfo == 'm' || sexInfo == 'M')
{
if(heightInfo >= 65 && heightInfo <=80)
{
if(weightInfo >= 130 && weightInfo <=250)
{
cout << "This candidate has been ACCEPTED! "<<endl;
acceptanceNum ++;
}
else{cout<<"This candidate has been rejected based on the WEIGHT requirement."<<endl;}
}
else{cout<<"This candidate has been rejected based on the HEIGHT requirement."<<endl;}
}
if(sexInfo == 'F' || sexInfo == 'f')
{
if(heightInfo >= 62 && heightInfo <=75)
{
if(weightInfo >= 110 && weightInfo <=185)
{
cout << "This candidate has been ACCEPTED! "<<endl;
acceptanceNum ++;
}
else{cout<<"This candidate has been rejected based on the WEIGHT requirement."<<endl;}
}
else{cout<<"This candidate has been rejected based on the HEIGHT requirement."<<endl;}
}
cout<<"\n\n"<<endl;
cout << left << setw(OUTPUT) << "Please enter the candidate's infromation (enter 'X' to exit). ";
//cin.get(candidateInfo);
//cin.ignore(1000, '\n');
cout << left << setw(OUTPUT) << "\nSex: ";
cin >>sexInfo;
cin.ignore(1000, '\n');
}
return 0;
}
DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma
Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t
Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th
1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of
1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of