SlideShare a Scribd company logo
1 of 11
Week 2
PRG 218 Variables and Input and Output Operations
You will Write eight assignment 70- to 100-word response to
the following:
Supporting Activity: Small Program
Create a small program that:
1) Prompts the user for a positive integer.
2) Prints out 0 if the number is ODD or 1 if the number is
EVEN.
Did you encounter compiler errors? How did you test your
code?
Are there multiple ways to write this program? Explain.
Supporting Activity: Code Exercise
2 Type in the code and run any 3 of the "Try It Out" exercises
in Ch. 2.
Which exercises did you select? Why? What did you learn?
3 What is the purpose of the document template in an MFC
Windows program?
5 Why do you need to be careful, and plan your program
structure in advance, when using the Application Wizard?
6 Code up the simple text editor program. Build both debug and
release versions, and examine the types and sizes of the fi les
produced in each case.
7 Generate the text editor application several times, trying diff
erent project styles from the Application Type in Application
Wizard.
8 Program Input and the Software Design Process" of
Programming and Problem Solving with C++: Comprehensive
Overtime Pay Compile Errors
Use the code in Appendix B for this assignment.
Correct the compile errors to arrive at the following output.
•Sample output:
Enter the Employee Name = Mary
Enter the hours worked = 43
Enter his or her hourly wage = 3.00
Employee Name ............. = Mary
Base Pay .................. = 120
Hours in Overtime ......... = 3
Overtime Pay Amount........ = 13.5
Total Pay.................. = 133.5
Appendix B
Overtime Pay Compile Errors
Instructions
Material
Use the following code to complete your Overtime Pay Compile
Errors assignment.
#include <io>
#include <string>
#include <iomanip>
using namespace std;
//Global Declarations of Variables
double iovertime_hours=0, iovertime pay=0, iovertime_extra=0;
int ihours, iwage ;
string cname ;
int main ()
{
//Enter Employee Information
cout << "nnEnter the employee name = ";
cin >> cname ;
cout << "Enter the hours worked = "
cin >> ihours;
cout << "Enter his or her hourly wage = "
cin >> iwage
// Determine if hours are greater than 40
if (ihours < 40)
{
//Do Calculations
iovertime_hours=ihours+40;
iovertime_pay=iwage-1.5 ;
iovertime_extra=iovertime_hours*iovertime_pay;
/ Display Employee Details
cout >> "nn";
cout << "Employee Name ............. = ' << cname <<
endl ;
cout << "Base Pay .................. = " << iwage*40 <<
endl
cout << "Hours in Overtime ......... = " <<
iovertime_hours << endl ;
cout << "Overtime Pay Amout......... = " <<
iovertime_extra << endl ;
cout << Total Pay ................. = " <<
iovertime_extra+(40*iwage) << endl;
}
else // Else hours are less than 40 hours
{
cout << "nn";
cout << "Employee Name ............. = " << cname <<
endl ;
cout << Base Pay .................. = " << iwage*40 <<
endl ;
cout << "Hours in Overtime ......... = " <<
iovertime_hours << endl ;
cout << "Overtime Pay Amout......... = " <<
iovertime_extra << endl ;
cout << "Total Pay ................. = " <<
iovertime_extra+(40*iwage) << endl;
} // End of the primary if statement
} //End of Int Main
Week
2
PRG 218
Variables and Input and Output Operations
You will
Write
eight assignment
7
0
-
to 100
-
word response to the following:
Supporting Activity:
Small Program
Create
a small program that:
1)
Prompts the user for a positive integer.
2)
Prints out 0 if the number is ODD or 1 if the number is EVEN.
Did you encounter compiler errors? How did you test your
code?
Are there multiple ways to write this program? Explain
.
Supporting Activity:
Code Exercise
2
Type
in the code and run
any 3 of the "Try It Out" exercises in Ch. 2.
Which exercises did you select? Why? What did you learn?
3
What is the purpose of the document template in an MFC
Windows program?
5
Why do you need to be careful, and plan your program structure
in advance,
when using the
Application Wizard?
6
Code up the simple text editor program. Build both debug and
release versions, and examine the
types and sizes of the fi les produced in each case.
7
Generate the text editor application several times, trying diff
ere
nt project styles from the Application
Type in Application Wizard
.
8
Program Input and the Software Design Process" of
Programming and Problem Solving with
C++: Comprehensive
Week 2
PRG 218 Variables and Input and Output Operations
You will Write eight assignment 70- to 100-word response to
the following:
Supporting Activity: Small Program
Create a small program that:
1) Prompts the user for a positive integer.
2) Prints out 0 if the number is ODD or 1 if the number is
EVEN.
Did you encounter compiler errors? How did you test your
code?
Are there multiple ways to write this program? Explain.
Supporting Activity: Code Exercise
2 Type in the code and run any 3 of the "Try It Out" exercises
in Ch. 2.
Which exercises did you select? Why? What did you learn?
3 What is the purpose of the document template in an MFC
Windows program?
5 Why do you need to be careful, and plan your program
structure in advance, when using the
Application Wizard?
6 Code up the simple text editor program. Build both debug and
release versions, and examine the
types and sizes of the fi les produced in each case.
7 Generate the text editor application several times, trying diff
erent project styles from the Application
Type in Application Wizard.
8 Program Input and the Software Design Process" of
Programming and Problem Solving with
C++: Comprehensive
Title
ABC/123 Version X
1
Supply and Demand Curves
ECO/365 Version 7
2
University of Phoenix Material
Economics - Definitions
Complete the following. Include your references using APA
formatting.
Write the definition for each of the following:
1. Law of Demand
2. Law of Supply
3. Price Elasticity of Demand
4. Macroeconomics
5. Microeconomics
Identify 2 Products whose demand is price elastic.
Identify 2 products whose demand is price inelastic.
Which of the following graphs best demonstrates the law of
demand?
a) I
b) II
c) III
d) IV
Which of the following graphs best demonstrates the law of
supply?
a) I
b) II
c) III
d) IV
References
Copyright © XXXX by University of Phoenix. All rights
reserved.
Copyright © 2013 by University of Phoenix. All rights reserved.

More Related Content

Similar to Week 2PRG 218 Variables and Input and Output OperationsYou w.docx

Cis 170 ilab 2 of 7
Cis 170 ilab 2 of 7Cis 170 ilab 2 of 7
Cis 170 ilab 2 of 7
comp274
 
Cis 170 i lab 2 of 7
Cis 170 i lab 2 of 7Cis 170 i lab 2 of 7
Cis 170 i lab 2 of 7
helpido9
 

Similar to Week 2PRG 218 Variables and Input and Output OperationsYou w.docx (20)

Cis 170 Extraordinary Success/newtonhelp.com
Cis 170 Extraordinary Success/newtonhelp.com  Cis 170 Extraordinary Success/newtonhelp.com
Cis 170 Extraordinary Success/newtonhelp.com
 
Cis 170 ilab 2 of 7
Cis 170 ilab 2 of 7Cis 170 ilab 2 of 7
Cis 170 ilab 2 of 7
 
Cis 170 ilab 2 of 7
Cis 170 ilab 2 of 7Cis 170 ilab 2 of 7
Cis 170 ilab 2 of 7
 
Cis 170 i lab 2 of 7
Cis 170 i lab 2 of 7Cis 170 i lab 2 of 7
Cis 170 i lab 2 of 7
 
Cmis 102 Enthusiastic Study / snaptutorial.com
Cmis 102 Enthusiastic Study / snaptutorial.comCmis 102 Enthusiastic Study / snaptutorial.com
Cmis 102 Enthusiastic Study / snaptutorial.com
 
Cmis 102 Success Begins / snaptutorial.com
Cmis 102 Success Begins / snaptutorial.comCmis 102 Success Begins / snaptutorial.com
Cmis 102 Success Begins / snaptutorial.com
 
Cmis 102 Effective Communication / snaptutorial.com
Cmis 102  Effective Communication / snaptutorial.comCmis 102  Effective Communication / snaptutorial.com
Cmis 102 Effective Communication / snaptutorial.com
 
CIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.comCIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.com
 
Cis 170 Education Organization -- snaptutorial.com
Cis 170   Education Organization -- snaptutorial.comCis 170   Education Organization -- snaptutorial.com
Cis 170 Education Organization -- snaptutorial.com
 
CIS 170 Inspiring Innovation/tutorialrank.com
 CIS 170 Inspiring Innovation/tutorialrank.com CIS 170 Inspiring Innovation/tutorialrank.com
CIS 170 Inspiring Innovation/tutorialrank.com
 
Cis 170 c Enhance teaching / snaptutorial.com
Cis 170 c  Enhance teaching / snaptutorial.comCis 170 c  Enhance teaching / snaptutorial.com
Cis 170 c Enhance teaching / snaptutorial.com
 
Devry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-startedDevry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-started
 
Devry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-startedDevry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-started
 
Python for Machine Learning
Python for Machine LearningPython for Machine Learning
Python for Machine Learning
 
CIS 170 Education Specialist / snaptutorial.com
CIS 170  Education Specialist / snaptutorial.comCIS 170  Education Specialist / snaptutorial.com
CIS 170 Education Specialist / snaptutorial.com
 
Devry cis-170-c-i lab-6-of-7-menu
Devry cis-170-c-i lab-6-of-7-menuDevry cis-170-c-i lab-6-of-7-menu
Devry cis-170-c-i lab-6-of-7-menu
 
Devry cis-170-c-i lab-6-of-7-menu
Devry cis-170-c-i lab-6-of-7-menuDevry cis-170-c-i lab-6-of-7-menu
Devry cis-170-c-i lab-6-of-7-menu
 
MPP-UPNVJ
MPP-UPNVJMPP-UPNVJ
MPP-UPNVJ
 
Required computer skills program devlopment
Required computer skills program devlopmentRequired computer skills program devlopment
Required computer skills program devlopment
 
Chapter 01.PPT
Chapter 01.PPTChapter 01.PPT
Chapter 01.PPT
 

More from melbruce90096

_____1.On July 9, Sheb Company sells goods on credit to .docx
_____1.On July 9, Sheb Company sells goods on credit to .docx_____1.On July 9, Sheb Company sells goods on credit to .docx
_____1.On July 9, Sheb Company sells goods on credit to .docx
melbruce90096
 
[removed]1.Which of the following processes addresses when to sp.docx
[removed]1.Which of the following processes addresses when to sp.docx[removed]1.Which of the following processes addresses when to sp.docx
[removed]1.Which of the following processes addresses when to sp.docx
melbruce90096
 
[removed]1.Photographs are an important source of data because t.docx
[removed]1.Photographs are an important source of data because t.docx[removed]1.Photographs are an important source of data because t.docx
[removed]1.Photographs are an important source of data because t.docx
melbruce90096
 
Your paper should address the following questionsWhen you hear th.docx
Your paper should address the following questionsWhen you hear th.docxYour paper should address the following questionsWhen you hear th.docx
Your paper should address the following questionsWhen you hear th.docx
melbruce90096
 
Your Final Project from this course will enable you to compare cultu.docx
Your Final Project from this course will enable you to compare cultu.docxYour Final Project from this course will enable you to compare cultu.docx
Your Final Project from this course will enable you to compare cultu.docx
melbruce90096
 
Your Final Paper is to be a comprehensive research study on one of t.docx
Your Final Paper is to be a comprehensive research study on one of t.docxYour Final Paper is to be a comprehensive research study on one of t.docx
Your Final Paper is to be a comprehensive research study on one of t.docx
melbruce90096
 
Your draft should establish and develop a single thesis [or co.docx
Your draft should establish and develop a single thesis [or co.docxYour draft should establish and develop a single thesis [or co.docx
Your draft should establish and develop a single thesis [or co.docx
melbruce90096
 
Your company has just hired your foreign friend to work in a middle-.docx
Your company has just hired your foreign friend to work in a middle-.docxYour company has just hired your foreign friend to work in a middle-.docx
Your company has just hired your foreign friend to work in a middle-.docx
melbruce90096
 
your assignment is to submit a presentation on Native-American liter.docx
your assignment is to submit a presentation on Native-American liter.docxyour assignment is to submit a presentation on Native-American liter.docx
your assignment is to submit a presentation on Native-American liter.docx
melbruce90096
 
Your assignment is to report on TWO cultural experience visits y.docx
Your assignment is to report on TWO cultural experience visits y.docxYour assignment is to report on TWO cultural experience visits y.docx
Your assignment is to report on TWO cultural experience visits y.docx
melbruce90096
 

More from melbruce90096 (20)

`Do assignments as detailed outNO WIKI for referncesPlease m.docx
`Do assignments as detailed outNO WIKI for referncesPlease m.docx`Do assignments as detailed outNO WIKI for referncesPlease m.docx
`Do assignments as detailed outNO WIKI for referncesPlease m.docx
 
_____1.On July 9, Sheb Company sells goods on credit to .docx
_____1.On July 9, Sheb Company sells goods on credit to .docx_____1.On July 9, Sheb Company sells goods on credit to .docx
_____1.On July 9, Sheb Company sells goods on credit to .docx
 
[removed]eltomate  Son rojos y se sirven (they are serv.docx
[removed]eltomate  Son rojos y se sirven (they are serv.docx[removed]eltomate  Son rojos y se sirven (they are serv.docx
[removed]eltomate  Son rojos y se sirven (they are serv.docx
 
[u07d2] Unit 7 Discussion 2Conflict and ChangeResourcesDiscuss.docx
[u07d2] Unit 7 Discussion 2Conflict and ChangeResourcesDiscuss.docx[u07d2] Unit 7 Discussion 2Conflict and ChangeResourcesDiscuss.docx
[u07d2] Unit 7 Discussion 2Conflict and ChangeResourcesDiscuss.docx
 
[removed]1.Which of the following processes addresses when to sp.docx
[removed]1.Which of the following processes addresses when to sp.docx[removed]1.Which of the following processes addresses when to sp.docx
[removed]1.Which of the following processes addresses when to sp.docx
 
Your paper should be a literary essay in which you present a combina.docx
Your paper should be a literary essay in which you present a combina.docxYour paper should be a literary essay in which you present a combina.docx
Your paper should be a literary essay in which you present a combina.docx
 
[removed]1.Photographs are an important source of data because t.docx
[removed]1.Photographs are an important source of data because t.docx[removed]1.Photographs are an important source of data because t.docx
[removed]1.Photographs are an important source of data because t.docx
 
Your paper should address the following questionsWhen you hear th.docx
Your paper should address the following questionsWhen you hear th.docxYour paper should address the following questionsWhen you hear th.docx
Your paper should address the following questionsWhen you hear th.docx
 
Your Final Project from this course will enable you to compare cultu.docx
Your Final Project from this course will enable you to compare cultu.docxYour Final Project from this course will enable you to compare cultu.docx
Your Final Project from this course will enable you to compare cultu.docx
 
Your Final Paper is to be a comprehensive research study on one of t.docx
Your Final Paper is to be a comprehensive research study on one of t.docxYour Final Paper is to be a comprehensive research study on one of t.docx
Your Final Paper is to be a comprehensive research study on one of t.docx
 
Your director is not aware of the involvement of the Department of H.docx
Your director is not aware of the involvement of the Department of H.docxYour director is not aware of the involvement of the Department of H.docx
Your director is not aware of the involvement of the Department of H.docx
 
YOull need to know The purpose of this research is to focus atte.docx
YOull need to know The purpose of this research is to focus atte.docxYOull need to know The purpose of this research is to focus atte.docx
YOull need to know The purpose of this research is to focus atte.docx
 
Your draft should establish and develop a single thesis [or co.docx
Your draft should establish and develop a single thesis [or co.docxYour draft should establish and develop a single thesis [or co.docx
Your draft should establish and develop a single thesis [or co.docx
 
Your company has just hired your foreign friend to work in a middle-.docx
Your company has just hired your foreign friend to work in a middle-.docxYour company has just hired your foreign friend to work in a middle-.docx
Your company has just hired your foreign friend to work in a middle-.docx
 
Your boss has asked you to write a Project Management Plan. Your pla.docx
Your boss has asked you to write a Project Management Plan. Your pla.docxYour boss has asked you to write a Project Management Plan. Your pla.docx
Your boss has asked you to write a Project Management Plan. Your pla.docx
 
Your boss has chosen you to give a presentation to a number of forei.docx
Your boss has chosen you to give a presentation to a number of forei.docxYour boss has chosen you to give a presentation to a number of forei.docx
Your boss has chosen you to give a presentation to a number of forei.docx
 
your assignment is to submit a presentation on Native-American liter.docx
your assignment is to submit a presentation on Native-American liter.docxyour assignment is to submit a presentation on Native-American liter.docx
your assignment is to submit a presentation on Native-American liter.docx
 
Your assignment is to report on TWO cultural experience visits y.docx
Your assignment is to report on TWO cultural experience visits y.docxYour assignment is to report on TWO cultural experience visits y.docx
Your assignment is to report on TWO cultural experience visits y.docx
 
your article must be a research article You can tell it is a researc.docx
your article must be a research article You can tell it is a researc.docxyour article must be a research article You can tell it is a researc.docx
your article must be a research article You can tell it is a researc.docx
 
Your administrator has come to you for information for a present.docx
Your administrator has come to you for information for a present.docxYour administrator has come to you for information for a present.docx
Your administrator has come to you for information for a present.docx
 

Recently uploaded

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Recently uploaded (20)

Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 

Week 2PRG 218 Variables and Input and Output OperationsYou w.docx

  • 1. Week 2 PRG 218 Variables and Input and Output Operations You will Write eight assignment 70- to 100-word response to the following: Supporting Activity: Small Program Create a small program that: 1) Prompts the user for a positive integer. 2) Prints out 0 if the number is ODD or 1 if the number is EVEN. Did you encounter compiler errors? How did you test your code? Are there multiple ways to write this program? Explain. Supporting Activity: Code Exercise 2 Type in the code and run any 3 of the "Try It Out" exercises in Ch. 2. Which exercises did you select? Why? What did you learn? 3 What is the purpose of the document template in an MFC Windows program? 5 Why do you need to be careful, and plan your program structure in advance, when using the Application Wizard? 6 Code up the simple text editor program. Build both debug and release versions, and examine the types and sizes of the fi les produced in each case. 7 Generate the text editor application several times, trying diff erent project styles from the Application Type in Application Wizard. 8 Program Input and the Software Design Process" of
  • 2. Programming and Problem Solving with C++: Comprehensive Overtime Pay Compile Errors Use the code in Appendix B for this assignment. Correct the compile errors to arrive at the following output. •Sample output: Enter the Employee Name = Mary Enter the hours worked = 43 Enter his or her hourly wage = 3.00 Employee Name ............. = Mary Base Pay .................. = 120 Hours in Overtime ......... = 3 Overtime Pay Amount........ = 13.5 Total Pay.................. = 133.5
  • 3. Appendix B Overtime Pay Compile Errors Instructions Material Use the following code to complete your Overtime Pay Compile Errors assignment. #include <io>
  • 4. #include <string> #include <iomanip> using namespace std; //Global Declarations of Variables double iovertime_hours=0, iovertime pay=0, iovertime_extra=0; int ihours, iwage ; string cname ; int main () { //Enter Employee Information cout << "nnEnter the employee name = "; cin >> cname ; cout << "Enter the hours worked = " cin >> ihours; cout << "Enter his or her hourly wage = " cin >> iwage // Determine if hours are greater than 40 if (ihours < 40) { //Do Calculations iovertime_hours=ihours+40; iovertime_pay=iwage-1.5 ; iovertime_extra=iovertime_hours*iovertime_pay; / Display Employee Details cout >> "nn"; cout << "Employee Name ............. = ' << cname << endl ; cout << "Base Pay .................. = " << iwage*40 << endl cout << "Hours in Overtime ......... = " << iovertime_hours << endl ;
  • 5. cout << "Overtime Pay Amout......... = " << iovertime_extra << endl ; cout << Total Pay ................. = " << iovertime_extra+(40*iwage) << endl; } else // Else hours are less than 40 hours { cout << "nn"; cout << "Employee Name ............. = " << cname << endl ; cout << Base Pay .................. = " << iwage*40 << endl ; cout << "Hours in Overtime ......... = " << iovertime_hours << endl ; cout << "Overtime Pay Amout......... = " << iovertime_extra << endl ; cout << "Total Pay ................. = " << iovertime_extra+(40*iwage) << endl; } // End of the primary if statement } //End of Int Main Week 2 PRG 218 Variables and Input and Output Operations You will Write eight assignment 7 0 -
  • 6. to 100 - word response to the following: Supporting Activity: Small Program Create a small program that: 1) Prompts the user for a positive integer. 2) Prints out 0 if the number is ODD or 1 if the number is EVEN. Did you encounter compiler errors? How did you test your code? Are there multiple ways to write this program? Explain . Supporting Activity: Code Exercise 2 Type in the code and run any 3 of the "Try It Out" exercises in Ch. 2.
  • 7. Which exercises did you select? Why? What did you learn? 3 What is the purpose of the document template in an MFC Windows program? 5 Why do you need to be careful, and plan your program structure in advance, when using the Application Wizard? 6 Code up the simple text editor program. Build both debug and release versions, and examine the types and sizes of the fi les produced in each case. 7 Generate the text editor application several times, trying diff ere nt project styles from the Application Type in Application Wizard . 8 Program Input and the Software Design Process" of Programming and Problem Solving with C++: Comprehensive
  • 8. Week 2 PRG 218 Variables and Input and Output Operations You will Write eight assignment 70- to 100-word response to the following: Supporting Activity: Small Program Create a small program that: 1) Prompts the user for a positive integer. 2) Prints out 0 if the number is ODD or 1 if the number is EVEN. Did you encounter compiler errors? How did you test your code? Are there multiple ways to write this program? Explain. Supporting Activity: Code Exercise 2 Type in the code and run any 3 of the "Try It Out" exercises in Ch. 2. Which exercises did you select? Why? What did you learn? 3 What is the purpose of the document template in an MFC Windows program?
  • 9. 5 Why do you need to be careful, and plan your program structure in advance, when using the Application Wizard? 6 Code up the simple text editor program. Build both debug and release versions, and examine the types and sizes of the fi les produced in each case. 7 Generate the text editor application several times, trying diff erent project styles from the Application Type in Application Wizard. 8 Program Input and the Software Design Process" of Programming and Problem Solving with C++: Comprehensive Title ABC/123 Version X 1 Supply and Demand Curves ECO/365 Version 7 2 University of Phoenix Material
  • 10. Economics - Definitions Complete the following. Include your references using APA formatting. Write the definition for each of the following: 1. Law of Demand 2. Law of Supply 3. Price Elasticity of Demand 4. Macroeconomics 5. Microeconomics Identify 2 Products whose demand is price elastic. Identify 2 products whose demand is price inelastic.
  • 11. Which of the following graphs best demonstrates the law of demand? a) I b) II c) III d) IV Which of the following graphs best demonstrates the law of supply? a) I b) II c) III d) IV References Copyright © XXXX by University of Phoenix. All rights reserved. Copyright © 2013 by University of Phoenix. All rights reserved.