SlideShare a Scribd company logo
/****************************************************
*******
Program Name: Simple Math Calculator
Program Author: Kyle NoCompile
Date Created: 9/28/14
Program Description:
This program performs simple arithmetic calculations.
The user enters numbers and the math operation to
perform on those numbers. The program will then display
the result of the operation. The program allows the
user to continue entering a math operation and an
integer to calculate off of the previous calculation
result.
Modified Date:
Modified Description:
*****************************************************
******/
#include <iostream>
using namespace std;
// Function prototypes:
void showWelcome(void);
int getUserIntegerInput();
char getMathChoice()
int getInteger(bool);
bool validateMathChoice(char choice)
int doAddition(int int1, int int2);
int doSubtraction(int, int);
int doMath(int firstInt, int secondInt, char mathFunc);
void showResult(int)
float keepCalculating();
// This is the main function (where the program begins)
int main(void)
{
// Variables to hold local data
int runningTotal; nextValue;
int mathChoice();
bool keepGoing;
// Call the showWelcome() function
showWelcome(void);
// Call the getInteger() function (for the first integer)
// and store the result in the "runningTotal" variable
runningTotal = GetInteger(true);
// Loop after each calculation to see if the user wants to
keep going
do
{
// Call the getMathChoice() function and store result
in "mathChoice" variable
mathChoice = getMathChoice(42);
// Call validateMathChoice() function, passing it the
user's math choice
// and using the return value to decide what to do next
if (validateMathChoice())
{
// Call the getInteger() function (for the second
and subsequent integers)
// and store the result in the "nextValue"
variable
nextValue = getInteger(false);
// Call the doMath() function and pass it all of
the user input
// and store the return value in the
"runningTotal" variable (overwrite
// previous "runningTotal" variable value. This
will allow for us to
// update the running total of all calculations up
to this point.
runningTotal = doMath(runningTotal nextValue
mathChoice);
// Call the showResult() function to show the
result
showResult(runningTotal);
}
else
{
// If the user chose an invalid math function...
cout<<Not a valid math choice. Try
again<<endl;
}
}
// Call the keepCalculating() function and use the return
value
// to decide whether to continue looping
while (keepCalculating);
return 0;
}
// This function shows a nice welcome message
void showWelcome()
{
cout<<"******************************************
"<<endl;
cout<<"Welcome to the simple calculator
program!"<<endl;
cout<<"This program will do simple addition and"<<endl
cout<<"subtraction. Math is fun, so enjoy!"<<endl;
cout<<"******************************************
"<<endl;
}
// This function gets integer input from the user
string getUserIntegerInput(void)
{
int input;
cin<<input;
return input;
}
// This function asks the user for a math function
// and returns the user's input
char getMathChoice()
{
char choice;
cout<<endl<<"Please select a math function to perform
("+" = Addition, "-" = Subtraction): ";
cin>>choice;
ret choice;
}
// this function asks the user for either the first integer
// or the second and returns the user's input
int getInteger(bool firstNumber)
{
cout<<endl<<"Please enter the ";
// if the "firstNumber" variable is true, then this
// is the first number being collected
if (firstNumber)
{
cout<<"first ";
}
// Otherwise, it's the second number being collected
else
(
cout<<"second ";
)
cout<<"integer: ";
// Call the getUserIntegerInput() function and return the
return value from it
return = getUserIntegerInput();
}
// This function validates the user's match function choice
// by returning a true for valid, and a false for invalid
bool validateMathChoice(char choice)
{
if (choice == '+' && choice == '-')
{
return true;
}
else
{
return false;
}
}
// This function adds two integers
int doAddition(int int1, int int2);
{
return int1 + int2;
}
// This function subtracts the second integer
// parameter from the first integer parameter
int doSubtraction(int int1, int int2);
{
return int1 - int2;
}
// This function determines the result of the math
// operation requested by the user
int doMath(int firstInt, int secondInt, char mathFunc)
{
int result;
switch (mathFunc == true)
{
// If the math function is a "+", then call the
// doAddition() function and store the return
// value in the "result" variable
case '+':
result = DoAddition(firstInt, secondInt);
// If the math function is a "-", then call the
// doSubtraction() function and store the return
// value in the "result" variable
case '-':
result = DoSubtraction(firstInt, secondInt);
break;
}
return result;
}
// This function displays the result of a math operation
bool showResult(int result)
{
cout<<endl<<"The result is "<<result<<endl;
}
// This function asks the user if he/she wants to keep calculating
// using the program and returns the user's input
bool keepCalculating()
{
char cont;
cout>>endl>>"Would you like to continue calculating?
(Y/N): ";
cin>>cont;
// Return true if the user enters either "Y" or "y"
if (cont = 'Y' || cont = 'y')
{
return true;
}
// Otherwise return false
else
{
return false;
}
}
Experiment Design
You work for a curriculum development company that has
created a program designed to teach reading to students in
grades 1-3.
Use APA Style Guide to ensure successful completion of the
assignment.
1) Include the following in your experiment design
a) Develop a hypothesis, labeling the independent and
dependent variables,
b) In 1275 words discuss how the psychoanalytic, cognitive,
and behavior/social development of the students will affect the
way you design and conduct the experiment.
c) Discuss what the experimental and control groups are
doing in the study
d) Decide how many participants are needed and from what
population groups they should come
e) Discuss random sampling and random assignment.
CONCENTRATE ONLY ON PART A,C,D & E ONLY DO NOT
WORRY ABOUT PART B HIGHLITED YELLOW.

More Related Content

Similar to Pro.docx

Advanced pointer
Advanced pointerAdvanced pointer
Advanced pointer
Rubal Bansal
 
I have the first program completed (not how request, but it works) a.pdf
I have the first program completed (not how request, but it works) a.pdfI have the first program completed (not how request, but it works) a.pdf
I have the first program completed (not how request, but it works) a.pdf
footworld1
 
OOP.pptx
OOP.pptxOOP.pptx
OOP.pptx
SanketAde1
 
C# labprograms
C# labprogramsC# labprograms
C# labprograms
Jafar Nesargi
 
Object Oriented Programming using C++: Ch08 Operator Overloading.pptx
Object Oriented Programming using C++: Ch08 Operator Overloading.pptxObject Oriented Programming using C++: Ch08 Operator Overloading.pptx
Object Oriented Programming using C++: Ch08 Operator Overloading.pptx
RashidFaridChishti
 
PQTimer.java A simple driver program to run timing t.docx
  PQTimer.java     A simple driver program to run timing t.docx  PQTimer.java     A simple driver program to run timing t.docx
PQTimer.java A simple driver program to run timing t.docx
joyjonna282
 
C# Assignmet Help
C# Assignmet HelpC# Assignmet Help
C# Assignmet Help
Programming Homework Help
 
Integration Project Inspection 3
Integration Project Inspection 3Integration Project Inspection 3
Integration Project Inspection 3
Dillon Lee
 
ONLY EDIT CapacityOptimizer.java, Simulator.java, and TriangularD.pdf
ONLY EDIT  CapacityOptimizer.java, Simulator.java, and TriangularD.pdfONLY EDIT  CapacityOptimizer.java, Simulator.java, and TriangularD.pdf
ONLY EDIT CapacityOptimizer.java, Simulator.java, and TriangularD.pdf
vinodagrawal6699
 
g++ -o simpleVector.exe simpleVector.cpp #include stdio.h #i.pdf
g++ -o simpleVector.exe simpleVector.cpp #include stdio.h #i.pdfg++ -o simpleVector.exe simpleVector.cpp #include stdio.h #i.pdf
g++ -o simpleVector.exe simpleVector.cpp #include stdio.h #i.pdf
arakalamkah11
 
Pragmatic functional refactoring with java 8 (1)
Pragmatic functional refactoring with java 8 (1)Pragmatic functional refactoring with java 8 (1)
Pragmatic functional refactoring with java 8 (1)
RichardWarburton
 
Implementing of classical synchronization problem by using semaphores
Implementing of classical synchronization problem by using semaphoresImplementing of classical synchronization problem by using semaphores
Implementing of classical synchronization problem by using semaphores
Gowtham Reddy
 
C++ L05-Functions
C++ L05-FunctionsC++ L05-Functions
C++ L05-Functions
Mohammad Shaker
 
I worte the code according to the requirement.And also I wrote the c.pdf
I worte the code according to the requirement.And also I wrote the c.pdfI worte the code according to the requirement.And also I wrote the c.pdf
I worte the code according to the requirement.And also I wrote the c.pdf
sudhinjv
 
Oop project
Oop projectOop project
Oop project
Quratulain Naqvi
 
Algo>Queues
Algo>QueuesAlgo>Queues
Algo>Queues
Ain-ul-Moiz Khawaja
 
This is a C# project . I am expected to create as this image shows. .pdf
This is a C# project . I am expected to create as this image shows. .pdfThis is a C# project . I am expected to create as this image shows. .pdf
This is a C# project . I am expected to create as this image shows. .pdf
indiaartz
 
operator overloading
operator overloadingoperator overloading
operator overloading
Sorath Peetamber
 
Cmis 212 module 2 assignment
Cmis 212 module 2 assignmentCmis 212 module 2 assignment
Cmis 212 module 2 assignment
zjkdg986
 
Cmis 212 module 2 assignment
Cmis 212 module 2 assignmentCmis 212 module 2 assignment
Cmis 212 module 2 assignment
fdjfjfy4498
 

Similar to Pro.docx (20)

Advanced pointer
Advanced pointerAdvanced pointer
Advanced pointer
 
I have the first program completed (not how request, but it works) a.pdf
I have the first program completed (not how request, but it works) a.pdfI have the first program completed (not how request, but it works) a.pdf
I have the first program completed (not how request, but it works) a.pdf
 
OOP.pptx
OOP.pptxOOP.pptx
OOP.pptx
 
C# labprograms
C# labprogramsC# labprograms
C# labprograms
 
Object Oriented Programming using C++: Ch08 Operator Overloading.pptx
Object Oriented Programming using C++: Ch08 Operator Overloading.pptxObject Oriented Programming using C++: Ch08 Operator Overloading.pptx
Object Oriented Programming using C++: Ch08 Operator Overloading.pptx
 
PQTimer.java A simple driver program to run timing t.docx
  PQTimer.java     A simple driver program to run timing t.docx  PQTimer.java     A simple driver program to run timing t.docx
PQTimer.java A simple driver program to run timing t.docx
 
C# Assignmet Help
C# Assignmet HelpC# Assignmet Help
C# Assignmet Help
 
Integration Project Inspection 3
Integration Project Inspection 3Integration Project Inspection 3
Integration Project Inspection 3
 
ONLY EDIT CapacityOptimizer.java, Simulator.java, and TriangularD.pdf
ONLY EDIT  CapacityOptimizer.java, Simulator.java, and TriangularD.pdfONLY EDIT  CapacityOptimizer.java, Simulator.java, and TriangularD.pdf
ONLY EDIT CapacityOptimizer.java, Simulator.java, and TriangularD.pdf
 
g++ -o simpleVector.exe simpleVector.cpp #include stdio.h #i.pdf
g++ -o simpleVector.exe simpleVector.cpp #include stdio.h #i.pdfg++ -o simpleVector.exe simpleVector.cpp #include stdio.h #i.pdf
g++ -o simpleVector.exe simpleVector.cpp #include stdio.h #i.pdf
 
Pragmatic functional refactoring with java 8 (1)
Pragmatic functional refactoring with java 8 (1)Pragmatic functional refactoring with java 8 (1)
Pragmatic functional refactoring with java 8 (1)
 
Implementing of classical synchronization problem by using semaphores
Implementing of classical synchronization problem by using semaphoresImplementing of classical synchronization problem by using semaphores
Implementing of classical synchronization problem by using semaphores
 
C++ L05-Functions
C++ L05-FunctionsC++ L05-Functions
C++ L05-Functions
 
I worte the code according to the requirement.And also I wrote the c.pdf
I worte the code according to the requirement.And also I wrote the c.pdfI worte the code according to the requirement.And also I wrote the c.pdf
I worte the code according to the requirement.And also I wrote the c.pdf
 
Oop project
Oop projectOop project
Oop project
 
Algo>Queues
Algo>QueuesAlgo>Queues
Algo>Queues
 
This is a C# project . I am expected to create as this image shows. .pdf
This is a C# project . I am expected to create as this image shows. .pdfThis is a C# project . I am expected to create as this image shows. .pdf
This is a C# project . I am expected to create as this image shows. .pdf
 
operator overloading
operator overloadingoperator overloading
operator overloading
 
Cmis 212 module 2 assignment
Cmis 212 module 2 assignmentCmis 212 module 2 assignment
Cmis 212 module 2 assignment
 
Cmis 212 module 2 assignment
Cmis 212 module 2 assignmentCmis 212 module 2 assignment
Cmis 212 module 2 assignment
 

More from ChantellPantoja184

Problem 1Problem 2.docx
Problem 1Problem 2.docxProblem 1Problem 2.docx
Problem 1Problem 2.docx
ChantellPantoja184
 
Problem 20-1A Production cost flow and measurement; journal entrie.docx
Problem 20-1A Production cost flow and measurement; journal entrie.docxProblem 20-1A Production cost flow and measurement; journal entrie.docx
Problem 20-1A Production cost flow and measurement; journal entrie.docx
ChantellPantoja184
 
Problem 2 Obtain Io.Let x be the current through j2, ..docx
Problem 2 Obtain Io.Let x be the current through j2, ..docxProblem 2 Obtain Io.Let x be the current through j2, ..docx
Problem 2 Obtain Io.Let x be the current through j2, ..docx
ChantellPantoja184
 
Problem 1On April 1, 20X4, Rojas purchased land by giving $100,000.docx
Problem 1On April 1, 20X4, Rojas purchased land by giving $100,000.docxProblem 1On April 1, 20X4, Rojas purchased land by giving $100,000.docx
Problem 1On April 1, 20X4, Rojas purchased land by giving $100,000.docx
ChantellPantoja184
 
Problem 17-1 Dividends and Taxes [LO2]Dark Day, Inc., has declar.docx
Problem 17-1 Dividends and Taxes [LO2]Dark Day, Inc., has declar.docxProblem 17-1 Dividends and Taxes [LO2]Dark Day, Inc., has declar.docx
Problem 17-1 Dividends and Taxes [LO2]Dark Day, Inc., has declar.docx
ChantellPantoja184
 
Problem 1Problem 1 - Constant-Growth Common StockWhat is the value.docx
Problem 1Problem 1 - Constant-Growth Common StockWhat is the value.docxProblem 1Problem 1 - Constant-Growth Common StockWhat is the value.docx
Problem 1Problem 1 - Constant-Growth Common StockWhat is the value.docx
ChantellPantoja184
 
Problem 1Prescott, Inc., manufactures bookcases and uses an activi.docx
Problem 1Prescott, Inc., manufactures bookcases and uses an activi.docxProblem 1Prescott, Inc., manufactures bookcases and uses an activi.docx
Problem 1Prescott, Inc., manufactures bookcases and uses an activi.docx
ChantellPantoja184
 
Problem 1Preston Recliners manufactures leather recliners and uses.docx
Problem 1Preston Recliners manufactures leather recliners and uses.docxProblem 1Preston Recliners manufactures leather recliners and uses.docx
Problem 1Preston Recliners manufactures leather recliners and uses.docx
ChantellPantoja184
 
Problem 1Pro Forma Income Statement and Balance SheetBelow is the .docx
Problem 1Pro Forma Income Statement and Balance SheetBelow is the .docxProblem 1Pro Forma Income Statement and Balance SheetBelow is the .docx
Problem 1Pro Forma Income Statement and Balance SheetBelow is the .docx
ChantellPantoja184
 
Problem 2-1PROBLEM 2-1Solution Legend= Value given in problemGiven.docx
Problem 2-1PROBLEM 2-1Solution Legend= Value given in problemGiven.docxProblem 2-1PROBLEM 2-1Solution Legend= Value given in problemGiven.docx
Problem 2-1PROBLEM 2-1Solution Legend= Value given in problemGiven.docx
ChantellPantoja184
 
PROBLEM 14-6AProblem 14-6A Norwoods Borrowings1. Total amount of .docx
PROBLEM 14-6AProblem 14-6A Norwoods Borrowings1. Total amount of .docxPROBLEM 14-6AProblem 14-6A Norwoods Borrowings1. Total amount of .docx
PROBLEM 14-6AProblem 14-6A Norwoods Borrowings1. Total amount of .docx
ChantellPantoja184
 
Problem 13-3AThe stockholders’ equity accounts of Ashley Corpo.docx
Problem 13-3AThe stockholders’ equity accounts of Ashley Corpo.docxProblem 13-3AThe stockholders’ equity accounts of Ashley Corpo.docx
Problem 13-3AThe stockholders’ equity accounts of Ashley Corpo.docx
ChantellPantoja184
 
Problem 12-9AYour answer is partially correct.  Try again..docx
Problem 12-9AYour answer is partially correct.  Try again..docxProblem 12-9AYour answer is partially correct.  Try again..docx
Problem 12-9AYour answer is partially correct.  Try again..docx
ChantellPantoja184
 
Problem 1123456Xf122437455763715813910106Name DateTopic.docx
Problem 1123456Xf122437455763715813910106Name DateTopic.docxProblem 1123456Xf122437455763715813910106Name DateTopic.docx
Problem 1123456Xf122437455763715813910106Name DateTopic.docx
ChantellPantoja184
 
Problem 1. For the truss and loading shown below, calculate th.docx
Problem 1. For the truss and loading shown below, calculate th.docxProblem 1. For the truss and loading shown below, calculate th.docx
Problem 1. For the truss and loading shown below, calculate th.docx
ChantellPantoja184
 
Problem 1 (30 marks)Review enough information about .docx
Problem 1 (30 marks)Review enough information about .docxProblem 1 (30 marks)Review enough information about .docx
Problem 1 (30 marks)Review enough information about .docx
ChantellPantoja184
 
Problem 1 (10 points) Note that an eigenvector cannot be zero.docx
Problem 1 (10 points) Note that an eigenvector cannot be zero.docxProblem 1 (10 points) Note that an eigenvector cannot be zero.docx
Problem 1 (10 points) Note that an eigenvector cannot be zero.docx
ChantellPantoja184
 
Probation and Parole 3Running head Probation and Parole.docx
Probation and Parole 3Running head Probation and Parole.docxProbation and Parole 3Running head Probation and Parole.docx
Probation and Parole 3Running head Probation and Parole.docx
ChantellPantoja184
 
Problem 1(a) Complete the following ANOVA table based on 20 obs.docx
Problem 1(a) Complete the following ANOVA table based on 20 obs.docxProblem 1(a) Complete the following ANOVA table based on 20 obs.docx
Problem 1(a) Complete the following ANOVA table based on 20 obs.docx
ChantellPantoja184
 
Probe 140 SPrecipitation in inchesTemperature in F.docx
Probe 140 SPrecipitation in inchesTemperature in F.docxProbe 140 SPrecipitation in inchesTemperature in F.docx
Probe 140 SPrecipitation in inchesTemperature in F.docx
ChantellPantoja184
 

More from ChantellPantoja184 (20)

Problem 1Problem 2.docx
Problem 1Problem 2.docxProblem 1Problem 2.docx
Problem 1Problem 2.docx
 
Problem 20-1A Production cost flow and measurement; journal entrie.docx
Problem 20-1A Production cost flow and measurement; journal entrie.docxProblem 20-1A Production cost flow and measurement; journal entrie.docx
Problem 20-1A Production cost flow and measurement; journal entrie.docx
 
Problem 2 Obtain Io.Let x be the current through j2, ..docx
Problem 2 Obtain Io.Let x be the current through j2, ..docxProblem 2 Obtain Io.Let x be the current through j2, ..docx
Problem 2 Obtain Io.Let x be the current through j2, ..docx
 
Problem 1On April 1, 20X4, Rojas purchased land by giving $100,000.docx
Problem 1On April 1, 20X4, Rojas purchased land by giving $100,000.docxProblem 1On April 1, 20X4, Rojas purchased land by giving $100,000.docx
Problem 1On April 1, 20X4, Rojas purchased land by giving $100,000.docx
 
Problem 17-1 Dividends and Taxes [LO2]Dark Day, Inc., has declar.docx
Problem 17-1 Dividends and Taxes [LO2]Dark Day, Inc., has declar.docxProblem 17-1 Dividends and Taxes [LO2]Dark Day, Inc., has declar.docx
Problem 17-1 Dividends and Taxes [LO2]Dark Day, Inc., has declar.docx
 
Problem 1Problem 1 - Constant-Growth Common StockWhat is the value.docx
Problem 1Problem 1 - Constant-Growth Common StockWhat is the value.docxProblem 1Problem 1 - Constant-Growth Common StockWhat is the value.docx
Problem 1Problem 1 - Constant-Growth Common StockWhat is the value.docx
 
Problem 1Prescott, Inc., manufactures bookcases and uses an activi.docx
Problem 1Prescott, Inc., manufactures bookcases and uses an activi.docxProblem 1Prescott, Inc., manufactures bookcases and uses an activi.docx
Problem 1Prescott, Inc., manufactures bookcases and uses an activi.docx
 
Problem 1Preston Recliners manufactures leather recliners and uses.docx
Problem 1Preston Recliners manufactures leather recliners and uses.docxProblem 1Preston Recliners manufactures leather recliners and uses.docx
Problem 1Preston Recliners manufactures leather recliners and uses.docx
 
Problem 1Pro Forma Income Statement and Balance SheetBelow is the .docx
Problem 1Pro Forma Income Statement and Balance SheetBelow is the .docxProblem 1Pro Forma Income Statement and Balance SheetBelow is the .docx
Problem 1Pro Forma Income Statement and Balance SheetBelow is the .docx
 
Problem 2-1PROBLEM 2-1Solution Legend= Value given in problemGiven.docx
Problem 2-1PROBLEM 2-1Solution Legend= Value given in problemGiven.docxProblem 2-1PROBLEM 2-1Solution Legend= Value given in problemGiven.docx
Problem 2-1PROBLEM 2-1Solution Legend= Value given in problemGiven.docx
 
PROBLEM 14-6AProblem 14-6A Norwoods Borrowings1. Total amount of .docx
PROBLEM 14-6AProblem 14-6A Norwoods Borrowings1. Total amount of .docxPROBLEM 14-6AProblem 14-6A Norwoods Borrowings1. Total amount of .docx
PROBLEM 14-6AProblem 14-6A Norwoods Borrowings1. Total amount of .docx
 
Problem 13-3AThe stockholders’ equity accounts of Ashley Corpo.docx
Problem 13-3AThe stockholders’ equity accounts of Ashley Corpo.docxProblem 13-3AThe stockholders’ equity accounts of Ashley Corpo.docx
Problem 13-3AThe stockholders’ equity accounts of Ashley Corpo.docx
 
Problem 12-9AYour answer is partially correct.  Try again..docx
Problem 12-9AYour answer is partially correct.  Try again..docxProblem 12-9AYour answer is partially correct.  Try again..docx
Problem 12-9AYour answer is partially correct.  Try again..docx
 
Problem 1123456Xf122437455763715813910106Name DateTopic.docx
Problem 1123456Xf122437455763715813910106Name DateTopic.docxProblem 1123456Xf122437455763715813910106Name DateTopic.docx
Problem 1123456Xf122437455763715813910106Name DateTopic.docx
 
Problem 1. For the truss and loading shown below, calculate th.docx
Problem 1. For the truss and loading shown below, calculate th.docxProblem 1. For the truss and loading shown below, calculate th.docx
Problem 1. For the truss and loading shown below, calculate th.docx
 
Problem 1 (30 marks)Review enough information about .docx
Problem 1 (30 marks)Review enough information about .docxProblem 1 (30 marks)Review enough information about .docx
Problem 1 (30 marks)Review enough information about .docx
 
Problem 1 (10 points) Note that an eigenvector cannot be zero.docx
Problem 1 (10 points) Note that an eigenvector cannot be zero.docxProblem 1 (10 points) Note that an eigenvector cannot be zero.docx
Problem 1 (10 points) Note that an eigenvector cannot be zero.docx
 
Probation and Parole 3Running head Probation and Parole.docx
Probation and Parole 3Running head Probation and Parole.docxProbation and Parole 3Running head Probation and Parole.docx
Probation and Parole 3Running head Probation and Parole.docx
 
Problem 1(a) Complete the following ANOVA table based on 20 obs.docx
Problem 1(a) Complete the following ANOVA table based on 20 obs.docxProblem 1(a) Complete the following ANOVA table based on 20 obs.docx
Problem 1(a) Complete the following ANOVA table based on 20 obs.docx
 
Probe 140 SPrecipitation in inchesTemperature in F.docx
Probe 140 SPrecipitation in inchesTemperature in F.docxProbe 140 SPrecipitation in inchesTemperature in F.docx
Probe 140 SPrecipitation in inchesTemperature in F.docx
 

Recently uploaded

Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
MJDuyan
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
imrankhan141184
 
Solutons Maths Escape Room Spatial .pptx
Solutons Maths Escape Room Spatial .pptxSolutons Maths Escape Room Spatial .pptx
Solutons Maths Escape Room Spatial .pptx
spdendr
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
RAHUL
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
Constructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective CommunicationConstructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective Communication
Chevonnese Chevers Whyte, MBA, B.Sc.
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
Leena Ghag-Sakpal
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
BoudhayanBhattachari
 
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdfIGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
Amin Marwan
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
ZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptxZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptx
dot55audits
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 

Recently uploaded (20)

Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
 
Solutons Maths Escape Room Spatial .pptx
Solutons Maths Escape Room Spatial .pptxSolutons Maths Escape Room Spatial .pptx
Solutons Maths Escape Room Spatial .pptx
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
Constructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective CommunicationConstructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective Communication
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
 
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdfIGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
ZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptxZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptx
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 

Pro.docx

  • 1. /**************************************************** ******* Program Name: Simple Math Calculator Program Author: Kyle NoCompile Date Created: 9/28/14 Program Description: This program performs simple arithmetic calculations. The user enters numbers and the math operation to perform on those numbers. The program will then display the result of the operation. The program allows the user to continue entering a math operation and an integer to calculate off of the previous calculation result. Modified Date: Modified Description: ***************************************************** ******/
  • 2. #include <iostream> using namespace std; // Function prototypes: void showWelcome(void); int getUserIntegerInput(); char getMathChoice() int getInteger(bool); bool validateMathChoice(char choice) int doAddition(int int1, int int2); int doSubtraction(int, int); int doMath(int firstInt, int secondInt, char mathFunc); void showResult(int) float keepCalculating(); // This is the main function (where the program begins)
  • 3. int main(void) { // Variables to hold local data int runningTotal; nextValue; int mathChoice(); bool keepGoing; // Call the showWelcome() function showWelcome(void); // Call the getInteger() function (for the first integer) // and store the result in the "runningTotal" variable runningTotal = GetInteger(true); // Loop after each calculation to see if the user wants to keep going do { // Call the getMathChoice() function and store result
  • 4. in "mathChoice" variable mathChoice = getMathChoice(42); // Call validateMathChoice() function, passing it the user's math choice // and using the return value to decide what to do next if (validateMathChoice()) { // Call the getInteger() function (for the second and subsequent integers) // and store the result in the "nextValue" variable nextValue = getInteger(false); // Call the doMath() function and pass it all of the user input // and store the return value in the "runningTotal" variable (overwrite // previous "runningTotal" variable value. This will allow for us to // update the running total of all calculations up to this point.
  • 5. runningTotal = doMath(runningTotal nextValue mathChoice); // Call the showResult() function to show the result showResult(runningTotal); } else { // If the user chose an invalid math function... cout<<Not a valid math choice. Try again<<endl; } } // Call the keepCalculating() function and use the return value // to decide whether to continue looping while (keepCalculating);
  • 6. return 0; } // This function shows a nice welcome message void showWelcome() { cout<<"****************************************** "<<endl; cout<<"Welcome to the simple calculator program!"<<endl; cout<<"This program will do simple addition and"<<endl cout<<"subtraction. Math is fun, so enjoy!"<<endl; cout<<"****************************************** "<<endl; } // This function gets integer input from the user string getUserIntegerInput(void)
  • 7. { int input; cin<<input; return input; } // This function asks the user for a math function // and returns the user's input char getMathChoice() { char choice; cout<<endl<<"Please select a math function to perform ("+" = Addition, "-" = Subtraction): "; cin>>choice; ret choice; } // this function asks the user for either the first integer // or the second and returns the user's input
  • 8. int getInteger(bool firstNumber) { cout<<endl<<"Please enter the "; // if the "firstNumber" variable is true, then this // is the first number being collected if (firstNumber) { cout<<"first "; } // Otherwise, it's the second number being collected else ( cout<<"second "; ) cout<<"integer: ";
  • 9. // Call the getUserIntegerInput() function and return the return value from it return = getUserIntegerInput(); } // This function validates the user's match function choice // by returning a true for valid, and a false for invalid bool validateMathChoice(char choice) { if (choice == '+' && choice == '-') { return true; } else { return false;
  • 10. } } // This function adds two integers int doAddition(int int1, int int2); { return int1 + int2; } // This function subtracts the second integer // parameter from the first integer parameter int doSubtraction(int int1, int int2); { return int1 - int2; } // This function determines the result of the math
  • 11. // operation requested by the user int doMath(int firstInt, int secondInt, char mathFunc) { int result; switch (mathFunc == true) { // If the math function is a "+", then call the // doAddition() function and store the return // value in the "result" variable case '+': result = DoAddition(firstInt, secondInt); // If the math function is a "-", then call the // doSubtraction() function and store the return // value in the "result" variable case '-': result = DoSubtraction(firstInt, secondInt); break;
  • 12. } return result; } // This function displays the result of a math operation bool showResult(int result) { cout<<endl<<"The result is "<<result<<endl; } // This function asks the user if he/she wants to keep calculating // using the program and returns the user's input bool keepCalculating() { char cont; cout>>endl>>"Would you like to continue calculating? (Y/N): ";
  • 13. cin>>cont; // Return true if the user enters either "Y" or "y" if (cont = 'Y' || cont = 'y') { return true; } // Otherwise return false else { return false; } } Experiment Design You work for a curriculum development company that has created a program designed to teach reading to students in grades 1-3. Use APA Style Guide to ensure successful completion of the
  • 14. assignment. 1) Include the following in your experiment design a) Develop a hypothesis, labeling the independent and dependent variables, b) In 1275 words discuss how the psychoanalytic, cognitive, and behavior/social development of the students will affect the way you design and conduct the experiment. c) Discuss what the experimental and control groups are doing in the study d) Decide how many participants are needed and from what population groups they should come e) Discuss random sampling and random assignment. CONCENTRATE ONLY ON PART A,C,D & E ONLY DO NOT WORRY ABOUT PART B HIGHLITED YELLOW.