SlideShare a Scribd company logo
1 of 10
DEVRY CIS 170 C iLab 1 of 7 Getting Started
Check this A+ tutorial guideline at
http://www.cis170entirecourse.com/cis-170/cis-
170-c-ilab-1-of-7-getting-started
For more classes visit
http://www.cis170entirecourse.com
www.cisl70entirecourse.com
CIS 170 C iLab 1 of 7 Getting Started
Lab 1 of 7: Getting Started (Your First C++
Programs) Lab Overview - Scenario/Summary
Welcome to Programming with C++. The purpose
of this three-part lab is to walk you through the
following tutorial to become familiar with the
actions of compiling and executing a C++ program.
In general, this lab will instruct you on: how to
create a project; how to enter and save a program;
how to compile and run a program; how to, given a
simple problem using input and output, code and
test a program that meets the
specifications; and how to debug a simple program
of any syntax and logic errors.Deliverables
Section Deliverable Points Part A
Step 6: Program Listing and Output
15
Part B
Program Listing and Output
15
Part C
Program Listing and Output
www.cisiyOer1
^
Preparation:
If you are using the Citrix remote lab, follow the
login instructions located in the iLab tab in Course
Home.
Lab:
Part A: Getting Started Step 1: Start the Application
From the File menu, choose "New Project." Choose
“Win32 Console Application.” Enter a name in the
name field. Click “Next” and choose the following
options: Application Type: "Console Application"
Additional options: Check mark “Empty project”
and uncheck 8. Click Finish. Your project is now
created.
Step 2: How to Add a Source Code File to Your
Project (.cpp file)
In the Solution Explorer, right-click on the “Source
Files” folder and select "Add" and then "New
Item." In the next dialog box, choose C++ file
(.cpp), enter a name for your source code file, and
press the Add button. Type or copy and paste your
code into the newly created source code file. Build
the file by pressing F7, and then execute your
program by pressing CTRL-F5 (start without
debugging) or use the F5 key (Start Debugging).
Step 3: Create a Source Code FileM
Nowenter the following C++ program ex sac
„y as
you see it. Use the tab where appropriate. [Note:
C++ is case sensitive.] Instead of John Doe, type
your name.
#include
using namespace std; void main()
{
cout< "john="" doe',
='"'><endl;=',
"> cout<
"cis170c='"' -="" programming="" using=""
c++n";="">
cout< "nnnhello,="" world!nn";="">
}
When you execute a program in debug mode (F5),
the console screen may appear and disappear
before you have an opportunity to view your
output. There are several techniques you can use
to
pause the console screen so you can read the
output. On the very last line in the main()
function: a. insert the statement: system("pause");
-ORb. insert an input statement:
cin<myvarable;="">
Step 4: Output
The black screen or console should read:
John Doe
wwwpi™ - uslng C
++
Step 5: Save Program
Save your program by clicking File on the menu
bar and then clicking Save Program.cpp, or by
clicking the Save button on the toolbar, or Ctrl + S.
Step 6: Build Solution
To compile the program, click Build on the menu
bar and then click the BuildSolution or Build LabA
option. You should receive no error messages. If
you see some error messages, check the code
above to make sure you didn't key in something
wrong. Once you make your corrections to the
code, go ahead and click Build >> Build Solution
again.
Step 7: Execute the Program Once you have no
syntax errors, to execute or run your program,
click Debug on the menu bar, and then click
Start Without Debugging.
Step 8: Capture the Output Print a picture of
your screen output. (Do a print screen and paste
this into MS Word.)
Step 9: Print the Source Code Copy your source
code and paste it into the same Word document
as your screen print. Save the Word Document
as Lab01A_LastName_FirstInitial ^Note: Using
the Visual Studio editor to compile your
programs creates a lot of overhead. These
additional files will become important as you
create more sophisticated C# projects. Projects
can contain one or more source-code files. For
this course, you will not have to worry about all
the extra files that are created.
End of Part A
Part B: Calculate Total Tickets Step 1: Create
New Project Now create a new project and name
it LAB1B. Make sure you close your previous
program by clicking File >> Close Solution.
Step 2: Type in Program
Like before, enter the following program. Type in
your name for Developer and current date for Date
Written.
//...............................................................
// Programming Assignment: LAB1B
// Developer:_
// Date Written:_
// Purpose: Ticket Calculation Program
//...............................................................
#include
using namespace
std; void main()
, totalTkts; .com
iirtdiMTKK, adultTk
ts
+ adultTkts;
cout<totaltkts=""><endl;="">
}
Step 3: Save Program
Save your program by clicking File on the menu
bar and then clicking Save Program.cpp, or by
clicking the Save button on the toolbar, or Ctrl + S.
Step 4: Build Solution
To compile the program, click Build on the menu
bar and then click the BuildSolution or Build
LabB option. You should receive no error
messages. If
you see some error messages, check the code
above to make sure you didn't key in something
wrong. Once you make your corrections to the
code, go ahead and click Build >> Build Solution
again.
Step 5: Execute the Program Once you have no
syntax errors, to execute or run your program,
click Debug on the menu bar, and then click Start
Without Debugging.
Step 6: Capture the Output Capture a screen print
of your output. (Do a PRINT SCREEN and paste into
an MS Word document.) Copy your code and paste
it into the same MS Word document that contains
the screen print of your output. 3. Save the Word
Document as Lab01B_LastName_FirstInitial.
End of Part B Part C: Payroll Program Step 1:
Create a New Project Create a new project and
name it LAB1C. Make sure you close your previous
program by clicking
File >> Close Solution.
Include a comment box like what you coded in Part
B. This can go at the very top of your program. Step
2: Processing Logic
You need to write a program that calculates and
displays the take-home pay for a commissioned
sales employee along with all of the deductions.
Input: Prompt the user for the weekly sales.
Process: Perform the calculations. The employee
receives 7% of his or her total sales as his or her
gross pay. His or her federal tax rate is 18%. He or
she contributes 10% to his or her retirement
program and 6% to Social Security.
Output: Display the results Sample Output from
Lab 1:
Enter Weekly Sales: 28000 Total Sales: 28000.00
WWW.CIGT p
,a
,y (7
%)- 1
960«0
Federal tax paid: 352.80 Social security paid:
117.60 Retirement contribution: 196.00 Total
deductions: 666.40
Take home pay: 1293.60 Press any key to
continue . . . Flowchart: (continued on next page)
Pseudo Code:
1. Declare variables 2. Accept Input -
weeklySales 3. Calculate Gross Sales * .07 4.
Calculate Federal Pay * .18 5. Calculate Social Pay
* .06 6. Calculate Pay * .1 7. Calculate Total Tax +
Social Security +
Retirement 8. Calculate Total Take Home Pay
-Total Deductions 9. Display the following on
separate lines and format variables with $ and
decimal. a. Total Sales Amount: value of weekly
sales b. Gross Pay (.07): value of gross pay c.
Federal Tax paid (.18): value of federal tax d. Social
Security paid (.06): value of social security e.
Retirement contribution (.1): value of retirement f.
Total Deductions: value of total deductions g. Take
Home Pay: value of take home pay Note: Use
SetPrecisions(2) to format the output (see page 98
of the text). The statements should look something
like the following: //include the iomanip header
file at the top of the
#include
//use fixed and setprecision(2) to format the
number
//use setw(8) to control the width of the field
//use t to control the spacing between fields
cout< fixed=""><setprecision(2);=""> cout<
"gross="" pay="" (0.07):t=""
$"=""><setw(8)=""><grosspay=""><endl;="">
Retirement 8. Calculate Total Take Home Pay
-Total Deductions 9. Display the following on
separate lines and format variables with $ and
decimal. a. Total Sales Amount: value of weekly
sales b. Gross Pay (.07): value of gross pay c.
Federal Tax paid (.18): value of federal tax d. Social
Security paid (.06): value of social security e.
Retirement contribution (.1): value of retirement f.
Total Deductions: value of total deductions g. Take
Home Pay: value of take home pay Note: Use
SetPrecisions(2) to format the output (see page 98
of the text). The statements should look something
like the following: //include the iomanip header
file at the top of the
#include
//use fixed and setprecision(2) to format the
number
//use setw(8) to control the width of the field
//use t to control the spacing between fields
cout< fixed=""><setprecision(2);=""> cout<
"gross="" pay="" (0.07):t=""
$"=""><setw(8)=""><grosspay=""><endl;="">

More Related Content

What's hot

Cis 170 ilab 1 of 7
Cis 170 ilab 1 of 7Cis 170 ilab 1 of 7
Cis 170 ilab 1 of 7comp274
 
Writing first C Program
Writing first C ProgramWriting first C Program
Writing first C ProgramPriyanka Anni
 
Visual studio 2012
Visual studio 2012Visual studio 2012
Visual studio 2012Kiru Dennis
 
Getting started with_graphics
Getting started with_graphicsGetting started with_graphics
Getting started with_graphicsPyayNA
 
Introduction to C++
Introduction to C++Introduction to C++
Introduction to C++rohassanie
 
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsDevry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsnoahjamessss
 

What's hot (8)

Cis 170 ilab 1 of 7
Cis 170 ilab 1 of 7Cis 170 ilab 1 of 7
Cis 170 ilab 1 of 7
 
Visual c++ demo
Visual c++ demoVisual c++ demo
Visual c++ demo
 
Writing first C Program
Writing first C ProgramWriting first C Program
Writing first C Program
 
Visual studio 2012
Visual studio 2012Visual studio 2012
Visual studio 2012
 
Getting started with_graphics
Getting started with_graphicsGetting started with_graphics
Getting started with_graphics
 
Introduction to C++
Introduction to C++Introduction to C++
Introduction to C++
 
C# with Renas
C# with RenasC# with Renas
C# with Renas
 
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsDevry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
 

Similar to Devry cis-170-c-i lab-1-of-7-getting-started

CIS 170 Focus Dreams/newtonhelp.com
CIS 170 Focus Dreams/newtonhelp.comCIS 170 Focus Dreams/newtonhelp.com
CIS 170 Focus Dreams/newtonhelp.combellflower82
 
CIS 170 Imagine Your Future/newtonhelp.com   
CIS 170 Imagine Your Future/newtonhelp.com   CIS 170 Imagine Your Future/newtonhelp.com   
CIS 170 Imagine Your Future/newtonhelp.com   bellflower42
 
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 startedash52393
 
CIS 170 Inspiring Innovation/tutorialrank.com
 CIS 170 Inspiring Innovation/tutorialrank.com CIS 170 Inspiring Innovation/tutorialrank.com
CIS 170 Inspiring Innovation/tutorialrank.comjonhson110
 
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.comHarrisGeorg51
 
CIS 170 Exceptional Education - snaptutorial.com
CIS 170   Exceptional Education - snaptutorial.comCIS 170   Exceptional Education - snaptutorial.com
CIS 170 Exceptional Education - snaptutorial.comDavisMurphyB33
 
Cis 170 Education Organization / snaptutorial.com
Cis 170 Education Organization / snaptutorial.comCis 170 Education Organization / snaptutorial.com
Cis 170 Education Organization / snaptutorial.comBaileya126
 
Cis 170 Effective Communication / snaptutorial.com
Cis 170 Effective Communication / snaptutorial.comCis 170 Effective Communication / snaptutorial.com
Cis 170 Effective Communication / snaptutorial.comBaileyao
 
CIS 170 Achievement Education--cis170.com
CIS 170 Achievement Education--cis170.comCIS 170 Achievement Education--cis170.com
CIS 170 Achievement Education--cis170.comagathachristie170
 
CIS 170 Education for Service--cis170.com
CIS 170 Education for Service--cis170.comCIS 170 Education for Service--cis170.com
CIS 170 Education for Service--cis170.comwilliamwordsworth11
 
CIS 170 Redefined Education--cis170.com
CIS 170 Redefined Education--cis170.comCIS 170 Redefined Education--cis170.com
CIS 170 Redefined Education--cis170.comagathachristie208
 
CIS 170 Inspiring Innovation -- cis170.com
CIS 170 Inspiring Innovation -- cis170.comCIS 170 Inspiring Innovation -- cis170.com
CIS 170 Inspiring Innovation -- cis170.comkopiko104
 
CIS 170 Become Exceptional--cis170.com
CIS 170 Become Exceptional--cis170.comCIS 170 Become Exceptional--cis170.com
CIS 170 Become Exceptional--cis170.comclaric131
 
Devry cis-170-c-i lab-2-of-7-decisions
Devry cis-170-c-i lab-2-of-7-decisionsDevry cis-170-c-i lab-2-of-7-decisions
Devry cis-170-c-i lab-2-of-7-decisionsgovendaagoovenda
 
Devry cis-170-c-i lab-2-of-7-decisions
Devry cis-170-c-i lab-2-of-7-decisionsDevry cis-170-c-i lab-2-of-7-decisions
Devry cis-170-c-i lab-2-of-7-decisionsnoahjamessss
 
How to work with code blocks
How to work with code blocksHow to work with code blocks
How to work with code blocksTech Bikram
 
ABC Consolidated Financial InfoABC Companys current financial inf.docx
ABC Consolidated Financial InfoABC Companys current financial inf.docxABC Consolidated Financial InfoABC Companys current financial inf.docx
ABC Consolidated Financial InfoABC Companys current financial inf.docxransayo
 
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-menunoahjamessss
 
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-menucskvsmi44
 

Similar to Devry cis-170-c-i lab-1-of-7-getting-started (20)

CIS 170 Focus Dreams/newtonhelp.com
CIS 170 Focus Dreams/newtonhelp.comCIS 170 Focus Dreams/newtonhelp.com
CIS 170 Focus Dreams/newtonhelp.com
 
CIS 170 Imagine Your Future/newtonhelp.com   
CIS 170 Imagine Your Future/newtonhelp.com   CIS 170 Imagine Your Future/newtonhelp.com   
CIS 170 Imagine Your Future/newtonhelp.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
 
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
 
CIS 170 Exceptional Education - snaptutorial.com
CIS 170   Exceptional Education - snaptutorial.comCIS 170   Exceptional Education - snaptutorial.com
CIS 170 Exceptional Education - snaptutorial.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 Effective Communication / snaptutorial.com
Cis 170 Effective Communication / snaptutorial.comCis 170 Effective Communication / snaptutorial.com
Cis 170 Effective Communication / snaptutorial.com
 
CIS 170 Achievement Education--cis170.com
CIS 170 Achievement Education--cis170.comCIS 170 Achievement Education--cis170.com
CIS 170 Achievement Education--cis170.com
 
CIS 170 Education for Service--cis170.com
CIS 170 Education for Service--cis170.comCIS 170 Education for Service--cis170.com
CIS 170 Education for Service--cis170.com
 
CIS 170 Redefined Education--cis170.com
CIS 170 Redefined Education--cis170.comCIS 170 Redefined Education--cis170.com
CIS 170 Redefined Education--cis170.com
 
CIS 170 Inspiring Innovation -- cis170.com
CIS 170 Inspiring Innovation -- cis170.comCIS 170 Inspiring Innovation -- cis170.com
CIS 170 Inspiring Innovation -- cis170.com
 
CIS 170 Become Exceptional--cis170.com
CIS 170 Become Exceptional--cis170.comCIS 170 Become Exceptional--cis170.com
CIS 170 Become Exceptional--cis170.com
 
Devry cis-170-c-i lab-2-of-7-decisions
Devry cis-170-c-i lab-2-of-7-decisionsDevry cis-170-c-i lab-2-of-7-decisions
Devry cis-170-c-i lab-2-of-7-decisions
 
Devry cis-170-c-i lab-2-of-7-decisions
Devry cis-170-c-i lab-2-of-7-decisionsDevry cis-170-c-i lab-2-of-7-decisions
Devry cis-170-c-i lab-2-of-7-decisions
 
How to work with code blocks
How to work with code blocksHow to work with code blocks
How to work with code blocks
 
2621008 - C++ 1
2621008 -  C++ 12621008 -  C++ 1
2621008 - C++ 1
 
ABC Consolidated Financial InfoABC Companys current financial inf.docx
ABC Consolidated Financial InfoABC Companys current financial inf.docxABC Consolidated Financial InfoABC Companys current financial inf.docx
ABC Consolidated Financial InfoABC Companys current financial inf.docx
 
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
 

More from noahjamessss

Devry cis-170-c-i lab-7-of-7-sequential-files
Devry cis-170-c-i lab-7-of-7-sequential-filesDevry cis-170-c-i lab-7-of-7-sequential-files
Devry cis-170-c-i lab-7-of-7-sequential-filesnoahjamessss
 
Devry cis-170-c-i lab-4-of-7-functions
Devry cis-170-c-i lab-4-of-7-functionsDevry cis-170-c-i lab-4-of-7-functions
Devry cis-170-c-i lab-4-of-7-functionsnoahjamessss
 
Devry cis-170-c-i lab-3-of-7-looping
Devry cis-170-c-i lab-3-of-7-loopingDevry cis-170-c-i lab-3-of-7-looping
Devry cis-170-c-i lab-3-of-7-loopingnoahjamessss
 
Devry busn-278-entire-course
Devry busn-278-entire-courseDevry busn-278-entire-course
Devry busn-278-entire-coursenoahjamessss
 
Busn 278-week-4-midterm
Busn 278-week-4-midtermBusn 278-week-4-midterm
Busn 278-week-4-midtermnoahjamessss
 
Bus 650-week-6-final-paper-financial-analysis-the-lg-group
Bus 650-week-6-final-paper-financial-analysis-the-lg-groupBus 650-week-6-final-paper-financial-analysis-the-lg-group
Bus 650-week-6-final-paper-financial-analysis-the-lg-groupnoahjamessss
 
Ash bus-650-week-2-return-on-investment-education-funding
Ash bus-650-week-2-return-on-investment-education-fundingAsh bus-650-week-2-return-on-investment-education-funding
Ash bus-650-week-2-return-on-investment-education-fundingnoahjamessss
 
Ash bus-650-week-2-dq-2-managing-earnings
Ash bus-650-week-2-dq-2-managing-earningsAsh bus-650-week-2-dq-2-managing-earnings
Ash bus-650-week-2-dq-2-managing-earningsnoahjamessss
 
Ash bus-650-week-2-dq-1-initial-investment
Ash bus-650-week-2-dq-1-initial-investmentAsh bus-650-week-2-dq-1-initial-investment
Ash bus-650-week-2-dq-1-initial-investmentnoahjamessss
 
Ash bus-650-week-1-dq-2-short-term-or-long-term-view
Ash bus-650-week-1-dq-2-short-term-or-long-term-viewAsh bus-650-week-1-dq-2-short-term-or-long-term-view
Ash bus-650-week-1-dq-2-short-term-or-long-term-viewnoahjamessss
 
Ash bus-650-ash-complete-class
Ash bus-650-ash-complete-classAsh bus-650-ash-complete-class
Ash bus-650-ash-complete-classnoahjamessss
 
Keller hsm 541 week 7 course project due
Keller hsm 541 week 7 course project dueKeller hsm 541 week 7 course project due
Keller hsm 541 week 7 course project duenoahjamessss
 
Hrm 326 final exam guide
Hrm 326 final exam guideHrm 326 final exam guide
Hrm 326 final exam guidenoahjamessss
 
Mkt 421 final exam guide (new, 2017) new
Mkt 421 final exam guide (new, 2017) newMkt 421 final exam guide (new, 2017) new
Mkt 421 final exam guide (new, 2017) newnoahjamessss
 
Uop phl 458 week 3 dq 1 new
Uop phl 458 week 3 dq 1 newUop phl 458 week 3 dq 1 new
Uop phl 458 week 3 dq 1 newnoahjamessss
 
Uop phl 458 week 1 dq 1 new
Uop phl 458 week 1 dq 1 newUop phl 458 week 1 dq 1 new
Uop phl 458 week 1 dq 1 newnoahjamessss
 
Uop str 581 week 4
Uop str 581 week 4Uop str 581 week 4
Uop str 581 week 4noahjamessss
 
Uop str 581 capstone final exam part 2 new
Uop str 581 capstone final exam part 2 newUop str 581 capstone final exam part 2 new
Uop str 581 capstone final exam part 2 newnoahjamessss
 
Bus 401 week 5 final paper evaluation of corporate performance peps ico new
Bus 401 week 5 final paper evaluation of corporate performance peps ico newBus 401 week 5 final paper evaluation of corporate performance peps ico new
Bus 401 week 5 final paper evaluation of corporate performance peps ico newnoahjamessss
 

More from noahjamessss (20)

Devry cis-170-c-i lab-7-of-7-sequential-files
Devry cis-170-c-i lab-7-of-7-sequential-filesDevry cis-170-c-i lab-7-of-7-sequential-files
Devry cis-170-c-i lab-7-of-7-sequential-files
 
Devry cis-170-c-i lab-4-of-7-functions
Devry cis-170-c-i lab-4-of-7-functionsDevry cis-170-c-i lab-4-of-7-functions
Devry cis-170-c-i lab-4-of-7-functions
 
Devry cis-170-c-i lab-3-of-7-looping
Devry cis-170-c-i lab-3-of-7-loopingDevry cis-170-c-i lab-3-of-7-looping
Devry cis-170-c-i lab-3-of-7-looping
 
Devry busn-278-entire-course
Devry busn-278-entire-courseDevry busn-278-entire-course
Devry busn-278-entire-course
 
Busn 278-week-4-midterm
Busn 278-week-4-midtermBusn 278-week-4-midterm
Busn 278-week-4-midterm
 
Bus 650-week-6-final-paper-financial-analysis-the-lg-group
Bus 650-week-6-final-paper-financial-analysis-the-lg-groupBus 650-week-6-final-paper-financial-analysis-the-lg-group
Bus 650-week-6-final-paper-financial-analysis-the-lg-group
 
Ash bus-650-week-2-return-on-investment-education-funding
Ash bus-650-week-2-return-on-investment-education-fundingAsh bus-650-week-2-return-on-investment-education-funding
Ash bus-650-week-2-return-on-investment-education-funding
 
Ash bus-650-week-2-dq-2-managing-earnings
Ash bus-650-week-2-dq-2-managing-earningsAsh bus-650-week-2-dq-2-managing-earnings
Ash bus-650-week-2-dq-2-managing-earnings
 
Ash bus-650-week-2-dq-1-initial-investment
Ash bus-650-week-2-dq-1-initial-investmentAsh bus-650-week-2-dq-1-initial-investment
Ash bus-650-week-2-dq-1-initial-investment
 
Ash bus-650-week-1-dq-2-short-term-or-long-term-view
Ash bus-650-week-1-dq-2-short-term-or-long-term-viewAsh bus-650-week-1-dq-2-short-term-or-long-term-view
Ash bus-650-week-1-dq-2-short-term-or-long-term-view
 
Ash bus-650-ash-complete-class
Ash bus-650-ash-complete-classAsh bus-650-ash-complete-class
Ash bus-650-ash-complete-class
 
Keller hsm 541 week 7 course project due
Keller hsm 541 week 7 course project dueKeller hsm 541 week 7 course project due
Keller hsm 541 week 7 course project due
 
Hrm 326 final exam guide
Hrm 326 final exam guideHrm 326 final exam guide
Hrm 326 final exam guide
 
Mkt 421 final exam guide (new, 2017) new
Mkt 421 final exam guide (new, 2017) newMkt 421 final exam guide (new, 2017) new
Mkt 421 final exam guide (new, 2017) new
 
Uop phl 458 week 3 dq 1 new
Uop phl 458 week 3 dq 1 newUop phl 458 week 3 dq 1 new
Uop phl 458 week 3 dq 1 new
 
Uop phl 458 week 1 dq 1 new
Uop phl 458 week 1 dq 1 newUop phl 458 week 1 dq 1 new
Uop phl 458 week 1 dq 1 new
 
Uop str 581 week 4
Uop str 581 week 4Uop str 581 week 4
Uop str 581 week 4
 
Uop str 581 capstone final exam part 2 new
Uop str 581 capstone final exam part 2 newUop str 581 capstone final exam part 2 new
Uop str 581 capstone final exam part 2 new
 
Str 581
Str 581Str 581
Str 581
 
Bus 401 week 5 final paper evaluation of corporate performance peps ico new
Bus 401 week 5 final paper evaluation of corporate performance peps ico newBus 401 week 5 final paper evaluation of corporate performance peps ico new
Bus 401 week 5 final paper evaluation of corporate performance peps ico new
 

Recently uploaded

Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 

Recently uploaded (20)

Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 

Devry cis-170-c-i lab-1-of-7-getting-started

  • 1. DEVRY CIS 170 C iLab 1 of 7 Getting Started Check this A+ tutorial guideline at http://www.cis170entirecourse.com/cis-170/cis- 170-c-ilab-1-of-7-getting-started For more classes visit http://www.cis170entirecourse.com www.cisl70entirecourse.com CIS 170 C iLab 1 of 7 Getting Started Lab 1 of 7: Getting Started (Your First C++ Programs) Lab Overview - Scenario/Summary Welcome to Programming with C++. The purpose of this three-part lab is to walk you through the following tutorial to become familiar with the actions of compiling and executing a C++ program. In general, this lab will instruct you on: how to create a project; how to enter and save a program; how to compile and run a program; how to, given a simple problem using input and output, code and test a program that meets the
  • 2. specifications; and how to debug a simple program of any syntax and logic errors.Deliverables Section Deliverable Points Part A Step 6: Program Listing and Output 15 Part B Program Listing and Output 15 Part C Program Listing and Output www.cisiyOer1 ^ Preparation: If you are using the Citrix remote lab, follow the login instructions located in the iLab tab in Course Home. Lab: Part A: Getting Started Step 1: Start the Application From the File menu, choose "New Project." Choose “Win32 Console Application.” Enter a name in the name field. Click “Next” and choose the following options: Application Type: "Console Application" Additional options: Check mark “Empty project”
  • 3. and uncheck 8. Click Finish. Your project is now created. Step 2: How to Add a Source Code File to Your Project (.cpp file) In the Solution Explorer, right-click on the “Source Files” folder and select "Add" and then "New Item." In the next dialog box, choose C++ file (.cpp), enter a name for your source code file, and press the Add button. Type or copy and paste your code into the newly created source code file. Build the file by pressing F7, and then execute your program by pressing CTRL-F5 (start without debugging) or use the F5 key (Start Debugging). Step 3: Create a Source Code FileM Nowenter the following C++ program ex sac „y as you see it. Use the tab where appropriate. [Note: C++ is case sensitive.] Instead of John Doe, type your name. #include using namespace std; void main() { cout< "john="" doe', ='"'><endl;=', "> cout< "cis170c='"' -="" programming="" using="" c++n";=""> cout< "nnnhello,="" world!nn";=""> }
  • 4. When you execute a program in debug mode (F5), the console screen may appear and disappear before you have an opportunity to view your output. There are several techniques you can use to pause the console screen so you can read the output. On the very last line in the main() function: a. insert the statement: system("pause"); -ORb. insert an input statement: cin<myvarable;=""> Step 4: Output The black screen or console should read: John Doe wwwpi™ - uslng C ++ Step 5: Save Program Save your program by clicking File on the menu bar and then clicking Save Program.cpp, or by clicking the Save button on the toolbar, or Ctrl + S. Step 6: Build Solution To compile the program, click Build on the menu bar and then click the BuildSolution or Build LabA option. You should receive no error messages. If you see some error messages, check the code above to make sure you didn't key in something wrong. Once you make your corrections to the
  • 5. code, go ahead and click Build >> Build Solution again. Step 7: Execute the Program Once you have no syntax errors, to execute or run your program, click Debug on the menu bar, and then click Start Without Debugging. Step 8: Capture the Output Print a picture of your screen output. (Do a print screen and paste this into MS Word.) Step 9: Print the Source Code Copy your source code and paste it into the same Word document as your screen print. Save the Word Document as Lab01A_LastName_FirstInitial ^Note: Using the Visual Studio editor to compile your programs creates a lot of overhead. These additional files will become important as you create more sophisticated C# projects. Projects can contain one or more source-code files. For this course, you will not have to worry about all the extra files that are created. End of Part A Part B: Calculate Total Tickets Step 1: Create New Project Now create a new project and name it LAB1B. Make sure you close your previous program by clicking File >> Close Solution. Step 2: Type in Program
  • 6. Like before, enter the following program. Type in your name for Developer and current date for Date Written. //............................................................... // Programming Assignment: LAB1B // Developer:_ // Date Written:_ // Purpose: Ticket Calculation Program //............................................................... #include using namespace std; void main() , totalTkts; .com iirtdiMTKK, adultTk ts + adultTkts; cout<totaltkts=""><endl;=""> } Step 3: Save Program Save your program by clicking File on the menu bar and then clicking Save Program.cpp, or by clicking the Save button on the toolbar, or Ctrl + S. Step 4: Build Solution To compile the program, click Build on the menu bar and then click the BuildSolution or Build LabB option. You should receive no error messages. If
  • 7. you see some error messages, check the code above to make sure you didn't key in something wrong. Once you make your corrections to the code, go ahead and click Build >> Build Solution again. Step 5: Execute the Program Once you have no syntax errors, to execute or run your program, click Debug on the menu bar, and then click Start Without Debugging. Step 6: Capture the Output Capture a screen print of your output. (Do a PRINT SCREEN and paste into an MS Word document.) Copy your code and paste it into the same MS Word document that contains the screen print of your output. 3. Save the Word Document as Lab01B_LastName_FirstInitial. End of Part B Part C: Payroll Program Step 1: Create a New Project Create a new project and name it LAB1C. Make sure you close your previous program by clicking File >> Close Solution. Include a comment box like what you coded in Part B. This can go at the very top of your program. Step 2: Processing Logic
  • 8. You need to write a program that calculates and displays the take-home pay for a commissioned sales employee along with all of the deductions. Input: Prompt the user for the weekly sales. Process: Perform the calculations. The employee receives 7% of his or her total sales as his or her gross pay. His or her federal tax rate is 18%. He or she contributes 10% to his or her retirement program and 6% to Social Security. Output: Display the results Sample Output from Lab 1: Enter Weekly Sales: 28000 Total Sales: 28000.00 WWW.CIGT p ,a ,y (7 %)- 1 960«0 Federal tax paid: 352.80 Social security paid: 117.60 Retirement contribution: 196.00 Total deductions: 666.40 Take home pay: 1293.60 Press any key to continue . . . Flowchart: (continued on next page) Pseudo Code: 1. Declare variables 2. Accept Input - weeklySales 3. Calculate Gross Sales * .07 4. Calculate Federal Pay * .18 5. Calculate Social Pay * .06 6. Calculate Pay * .1 7. Calculate Total Tax + Social Security +
  • 9. Retirement 8. Calculate Total Take Home Pay -Total Deductions 9. Display the following on separate lines and format variables with $ and decimal. a. Total Sales Amount: value of weekly sales b. Gross Pay (.07): value of gross pay c. Federal Tax paid (.18): value of federal tax d. Social Security paid (.06): value of social security e. Retirement contribution (.1): value of retirement f. Total Deductions: value of total deductions g. Take Home Pay: value of take home pay Note: Use SetPrecisions(2) to format the output (see page 98 of the text). The statements should look something like the following: //include the iomanip header file at the top of the #include //use fixed and setprecision(2) to format the number //use setw(8) to control the width of the field //use t to control the spacing between fields cout< fixed=""><setprecision(2);=""> cout< "gross="" pay="" (0.07):t="" $"=""><setw(8)=""><grosspay=""><endl;="">
  • 10. Retirement 8. Calculate Total Take Home Pay -Total Deductions 9. Display the following on separate lines and format variables with $ and decimal. a. Total Sales Amount: value of weekly sales b. Gross Pay (.07): value of gross pay c. Federal Tax paid (.18): value of federal tax d. Social Security paid (.06): value of social security e. Retirement contribution (.1): value of retirement f. Total Deductions: value of total deductions g. Take Home Pay: value of take home pay Note: Use SetPrecisions(2) to format the output (see page 98 of the text). The statements should look something like the following: //include the iomanip header file at the top of the #include //use fixed and setprecision(2) to format the number //use setw(8) to control the width of the field //use t to control the spacing between fields cout< fixed=""><setprecision(2);=""> cout< "gross="" pay="" (0.07):t="" $"=""><setw(8)=""><grosspay=""><endl;="">