Category Archives: CIS 170 Devry

DEVRY CIS 170 C iLab 1 of 7 Getting Started

DEVRY CIS 170 C iLab 1 of 7 Getting Started

Check this A+ tutorial guideline at

http://www.assignmentcloud.com/cis-170/cis-170-c-ilab-1-of-7-getting-started

For more classes visit

http://www.assignmentcloud.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

15

Lab Steps

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 File

Now enter the following C++ program exactly 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< “\n\n\nhello,=”” world!\n\n”;=””>

}

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”);

-OR-

b. insert an input statement: cin<myvarable;=””>

Step 4: Output

The black screen or console should read:

John Doe

CIS170C – Programming using C++
Hello, World -

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()

{

intchildTkts, adultTkts, totalTkts;

;

;

+ 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
Gross pay (7%): 1960.00

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 file

#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;=””>

 

DEVRY CIS 170 C iLab 2 of 7 Decisions

DEVRY CIS 170 C iLab 2 of 7 Decisions

Check this A+ tutorial guideline at

http://www.assignmentcloud.com/cis-170/cis-170-ilab-2-of-7-decisions

For more classes visit

http://www.assignmentcloud.com

CIS 170 C iLab 2 of 7 Decisions

Lab # CIS CIS170C-A2 Lab 2 of 7: Decisions Lab Overview – Scenario/Summary

You will code, build, and execute two programs requiring decisions. The first program will determine the smaller of two numbers input on the screen. The second program will calculate the shipping charge based on the purchase amount input on the screen.

Learning outcomes:

To be able to design program logic using either a flowchart or pseudocode To be able to define and use data types To be able to prompt the user for input To be able to use the assignment statement for calculations To be able to display output to the console in a formatted manner To be able to debug a program of syntax and logic errors To be able to make decisionsDeliverables

Section

Deliverable

Points

Part A

Step 7: Program Listing and Output

20

Part B

Step 7: Program Listing and Output

25

Lab Steps

Preparation:

If you are using the Citrix remote lab, follow the login instructions located in the iLab tab in Course Home.

Locate the Visual Studio 2010 icon and launch the application.

Lab:

Part A: Determine Smallest Number

Step 1: Requirements

Write a program that inputs two numbers and determines which of the two numbers is the smallest. If the numbers are equal, display a message that they are equal.

Sample output from program:

You will be asked to enter two numbers.

The smallest value will be displayed or a message if they are the same.

Please enter a numeric value: 4

Please enter a numeric value: 7

The smallest value is 4

Press any key to continue . . .

AND THEN:

Please enter a numeric value: 7

Please enter a numeric value: 4

The smallest value is 4

Press any key to continue . . .

Step 2: Pseudocode

Using the pseudocode below, write the code that will meet the requirements:

Display description of program

Prompt the user for the first number

Prompt the user for the second number

If first number equals second number

Display the two numbers are equal

Else

If first number is greater than second number

Assign second number to smallest

Else

Assign first number to smallest

End-If

Display smallest number

End-If

Step 3: Create a New Project

Create a new project and name it LAB2A. Write your code using the processing logic in Part A, Step 2.

Step 4: 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 5: Build Solution

To compile the program, click Debug and then Build solution (F7). 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 6: 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 Debugging.

Step 7: 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. Save the Word Document as Lab02A_LastName_FirstInitial.

END OF PART A

Part B: Calculate Shipping Charge

Step 1: Requirements

Write a program that inputs the amount of the purchase and calculates the shipping charge based on the following table:

$0.00 – $250.00: $5.00

$250.01 – $500.00: $8.00

$500.01 – $1,000.00: $10.00

$1,000.01 – $5,000.00: $15.00

over $5,000.00: $20.00

Sample Output from Program:

Enter a purchase amount to find out your shipping charges.

Please enter the amount of your purchase: 234.65

The shipping charge on a purchase of $234.65 is $5.00.

Press any key to continue . . .

Step 2: Pseudocode

Using the pseudocode below, write the code that will meet the requirements.

Display program information

Prompt the user for the sale amount

If sale amount > $5,000.00

shipping is $20.00

Else if sale amount > $1,000.00

shipping is $15.00

Else if sale amount > $500.00

shipping is $10.00

Else if sale amount > $250.00

shipping is $8.00

Else if sale amount > $0.00

shipping is $5.00

Else

shipping is $0.00

End-If

If shipping is $0.00

Display “Error incorrect input”

Else

Display sale amount and shipping charge

End-If

Step 3: Create a New Project

Create a new project and name it LAB2B. Make sure you close your previous program by clicking File >> Close Solution. Write your code using the Processing Logic in Part B Step 2.

Step 4: 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 5: Build Solution

To compile the program, click Debug then Build solution (F7). 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 6: 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 Debugging.

Step 7: 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. Save the Word Document as Lab02B_LastName_FirstInitial.

DEVRYCIS 170 Entire Course

DEVRYCIS 170 Entire Course

Check this A+ tutorial guideline at

http://www.assignmentcloud.com/cis-170/cis-170-entire-course

For more classes visit

http://www.assignmentcloud.com

CIS 170 Entire Course

CIS 170C iLab 1 of 7 Getting Started

CIS 170 iLab 2 of 7 Decisions

CIS 170C iLab 3 of 7 Looping

CIS 170C iLab 4 of 7 Functions

CIS 170C iLab 5 of 7 Arrays and Strings

CIS 170C iLab 7 of 7 Sequential Files

CIS 170C Lab 6 of 7 Menu-Driven Applications

CIS 170 C Final Exam

CIS 170 Assignment 1 Categories of Computer Crime NEW

CIS 170 Assignment 1 Categories of Computer Crime NEW

Check this A+ tutorial guideline at

http://www.assignmentcloud.com/cis-170/cis-170-assignment-1-categories-of-computer-crime-new

For more classes visit

http://www.assignmentcloud.com/

CIS 170 Assignment 1 Categories of Computer Crime NEW

CIS 170 Assignment 3 The Role of the Internet and Crime NEW

CIS 170 Assignment 3 The Role of the Internet and Crime NEW

Check this A+ tutorial guideline at

http://www.assignmentcloud.com/cis-170/cis-170-assignment-3-the-role-of-the-internet-and-crime-new

For more classes visit

http://www.assignmentcloud.com/

CIS 170 Assignment 3 The Role of the Internet and Crime NEW

CIS 170 Assignment 4 Law Enforcement Challenges NEW

CIS 170 Assignment 4 Law Enforcement Challenges NEW

Check this A+ tutorial guideline at

http://www.assignmentcloud.com/cis-170/cis-170-assignment-4-law-enforcement-challenges-new

For more classes visit

http://www.assignmentcloud.com/

CIS 170 Assignment 4 Law Enforcement Challenges NEW

CIS 170 Assignment 5 The Role of Federal Agencies in Fighting Digital Crime NEW

CIS 170 Assignment 5 The Role of Federal Agencies in Fighting Digital Crime NEW

Check this A+ tutorial guideline at

http://www.assignmentcloud.com/cis-170/cis-170-assignment-5-the-role-of-federal-agencies-in-fighting-digital-crime-new

For more classes visit

http://www.assignmentcloud.com/

CIS 170 Assignment 5 The Role of Federal Agencies in Fighting Digital Crime NEW

DEVRY CIS 170 C iLab 1 of 7 Getting Started

Check this A+ tutorial guideline at

http://www.assignmentcloud.com/cis-170/cis-170-c-ilab-1-of-7-getting-started

For more classes visit

http://www.assignmentcloud.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

15

Lab Steps

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 File

Now enter the following C++ program exactly 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< “\n\n\nhello,=”” world!\n\n”;=””>

}

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”);

-OR-

b. insert an input statement: cin<myvarable;=””>

Step 4: Output

The black screen or console should read:

John Doe

CIS170C – Programming using C++
Hello, World -

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()

{

intchildTkts, adultTkts, totalTkts;

;

;

+ 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
Gross pay (7%): 1960.00

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 file

#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;=””>

DEVRY CIS 170 C iLab 2 of 7 Decisions

Check this A+ tutorial guideline at

http://www.assignmentcloud.com/cis-170/cis-170-ilab-2-of-7-decisions

For more classes visit

http://www.assignmentcloud.com

CIS 170 C iLab 2 of 7 Decisions

Lab # CIS CIS170C-A2 Lab 2 of 7: Decisions Lab Overview – Scenario/Summary

You will code, build, and execute two programs requiring decisions. The first program will determine the smaller of two numbers input on the screen. The second program will calculate the shipping charge based on the purchase amount input on the screen.

Learning outcomes:

To be able to design program logic using either a flowchart or pseudocode To be able to define and use data types To be able to prompt the user for input To be able to use the assignment statement for calculations To be able to display output to the console in a formatted manner To be able to debug a program of syntax and logic errors To be able to make decisionsDeliverables

Section

Deliverable

Points

Part A

Step 7: Program Listing and Output

20

Part B

Step 7: Program Listing and Output

25

Lab Steps

Preparation:

If you are using the Citrix remote lab, follow the login instructions located in the iLab tab in Course Home.

Locate the Visual Studio 2010 icon and launch the application.

Lab:

Part A: Determine Smallest Number

Step 1: Requirements

Write a program that inputs two numbers and determines which of the two numbers is the smallest. If the numbers are equal, display a message that they are equal.

Sample output from program:

You will be asked to enter two numbers.

The smallest value will be displayed or a message if they are the same.

Please enter a numeric value: 4

Please enter a numeric value: 7

The smallest value is 4

Press any key to continue . . .

AND THEN:

Please enter a numeric value: 7

Please enter a numeric value: 4

The smallest value is 4

Press any key to continue . . .

Step 2: Pseudocode

Using the pseudocode below, write the code that will meet the requirements:

Display description of program

Prompt the user for the first number

Prompt the user for the second number

If first number equals second number

Display the two numbers are equal

Else

If first number is greater than second number

Assign second number to smallest

Else

Assign first number to smallest

End-If

Display smallest number

End-If

Step 3: Create a New Project

Create a new project and name it LAB2A. Write your code using the processing logic in Part A, Step 2.

Step 4: 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 5: Build Solution

To compile the program, click Debug and then Build solution (F7). 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 6: 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 Debugging.

Step 7: 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. Save the Word Document as Lab02A_LastName_FirstInitial.

END OF PART A

Part B: Calculate Shipping Charge

Step 1: Requirements

Write a program that inputs the amount of the purchase and calculates the shipping charge based on the following table:

$0.00 – $250.00: $5.00

$250.01 – $500.00: $8.00

$500.01 – $1,000.00: $10.00

$1,000.01 – $5,000.00: $15.00

over $5,000.00: $20.00

Sample Output from Program:

Enter a purchase amount to find out your shipping charges.

Please enter the amount of your purchase: 234.65

The shipping charge on a purchase of $234.65 is $5.00.

Press any key to continue . . .

Step 2: Pseudocode

Using the pseudocode below, write the code that will meet the requirements.

Display program information

Prompt the user for the sale amount

If sale amount > $5,000.00

shipping is $20.00

Else if sale amount > $1,000.00

shipping is $15.00

Else if sale amount > $500.00

shipping is $10.00

Else if sale amount > $250.00

shipping is $8.00

Else if sale amount > $0.00

shipping is $5.00

Else

shipping is $0.00

End-If

If shipping is $0.00

Display “Error incorrect input”

Else

Display sale amount and shipping charge

End-If

Step 3: Create a New Project

Create a new project and name it LAB2B. Make sure you close your previous program by clicking File >> Close Solution. Write your code using the Processing Logic in Part B Step 2.

Step 4: 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 5: Build Solution

To compile the program, click Debug then Build solution (F7). 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 6: 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 Debugging.

Step 7: 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. Save the Word Document as Lab02B_LastName_FirstInitial.