SOLUTIONJUG.COMCIS/170 - iLab 1 of 7CLICK HERE TO GET THE SOLUTION !!!!!!!!Week 1: Your First Program: Data Types and Expr...
Step 3: Delete All Code in Program.csYour screen should now look like what you see below. Now, highlight all of the code t...
Copy your source code and paste it into your Word document.End of Part APart B: Calculate Total TicketsStep 1: Create New ...
+ S.Step 4: Build SolutionTo compile the program, click Build on the menu bar and then click the Build Solution or Build L...
Social security paid: $117.60Retirement contribution: $196.00Total deductions: $666.40Take home pay: $1,293.60Press any ke...
Step 5: Execute the ProgramOnce you have no syntax errors, to execute or run your program, click Debug on the menu bar and...
Upcoming SlideShare
Loading in …5
×

Cis 170 i lab 1 of 7

653 views
560 views

Published on

Week 1: Your First Program: Data Types and Expressions – iLab
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.

Objectives and Grading
Lab Objectives:
How to create a project
How to enter and save a program
How to compile and run a program
Given a simple problem using input and output, be able to code and test a program that meets the specifications.
Be able to debug a simple program of any syntax and logic errors.
Your lab grade will be based upon:
the formatting of your source code;
the use of meaningful identifiers;
the extent of internal documentation; and
the degree to which an exercise’s specifications are met.

Published in: Technology, Art & Photos
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
653
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Cis 170 i lab 1 of 7

  1. 1. SOLUTIONJUG.COMCIS/170 - iLab 1 of 7CLICK HERE TO GET THE SOLUTION !!!!!!!!Week 1: Your First Program: Data Types and Expressions – iLabWelcome to Programming with C#. The purpose of this three-part lab is to walk you through the followingtutorial to become familiar with the actions of compiling and executing a C# program.Objectives and GradingLab Objectives:1. How to create a project2. How to enter and save a program3. How to compile and run a program4. Given a simple problem using input and output, be able to code and test a program that meets thespecifications.5. Be able to debug a simple program of any syntax and logic errors.Your lab grade will be based upon:1. the formatting of your source code;2. the use of meaningful identifiers;3. the extent of internal documentation; and4. the degree to which an exercise’s specifications are met.Preparation: If you are using the Citrix remote lab, follow the login instructions located in the iLab tab inCourse Home.iLab StepsPart A: Getting StartedStep 1: Start the ApplicationLocate the Visual Studio 2010 icon and double click to open. Under Applications, click on the Microsoft Visual Studio.NET 2010C# software.Step 2: Create a C# Console ProjectChoose File->New Project, and click Console Application. In the project name box, enter LAB1A. Your screen should loobelow. If so, press the OK button.
  2. 2. Step 3: Delete All Code in Program.csYour screen should now look like what you see below. Now, highlight all of the code that you see [Ctrl + A] and press the Denot need this code because you will now be getting experience writing every line of a new program.Step 4: Type in ProgramNow enter the following C# program exactly as you see it. Use the tab where appropriate. (Note: C# is case sensitive.) Insteatype your name. class Hello { static void Main() { // display output System.Console.WriteLine(―John Doe‖); System.Console.WriteLine(―CIS170B – Programming using C#‖); System.Console.WriteLine(―nnnHello, world!nn‖); System.Console.WriteLine(―EOJ‖); System.Console.ReadLine(); } }Step 5: Save ProgramSave your program by clicking File on the menu bar and then clicking Save Program.cs, or by clicking the Savebutton on th+ S.Step 6: Build SolutionTo compile the program, click Debug on the menu bar and then click the Build Solution or Build LabAoption. You should remessages in the Error List window below the program. If you see some error messages, check the code above to make sure ysomething wrong. You can double click on each error message to better navigate to the area where the problem might be. Oncorrections to the code, go ahead and build the solution again.Step 7: Execute the ProgramOnce you have no compile errors, to execute or run your program, either: click Debug on the menu bar, and then Start Debugging; click the right arrow icon on the menu bar; or press the F5 key.Step 8: Capture the OutputPrint a picture of your screen output. (Do a print screen and paste this into your MS Word document.)Step 9: Print the Source Code
  3. 3. Copy your source code and paste it into your Word document.End of Part APart B: Calculate Total TicketsStep 1: Create New ProjectMake sure you close your previous program by clicking File >> Close Solution. Now, create a new project and name it LABStep 2: Type in ProgramLike before, delete the code that is automatically created and enter the following program. Type in your name for Developer afor Date Written.// —————————————————————// Programming Assignment: LAB1B// Developer: ______________________// Date Written: ______________________// Purpose: Ticket Calculation Program// ————————————————————— using System; class FirstOutputWithUsing { static void Main() { // create variables and load values int childTkts, adultTkts, totalTkts; childTkts = 3; adultTkts = 2; // process (calculation) totalTkts = childTkts + adultTkts; // display output Console.WriteLine(totalTkts); // pauseConsole.Write(―nPress Enter to continue…‖);Console.ReadLine(); } }Step 3: Save ProgramSave your program by clicking File on the menu bar and then clicking Save Program.cs, or by clicking the Savebutton on th
  4. 4. + S.Step 4: Build SolutionTo compile the program, click Build on the menu bar and then click the Build Solution or Build LabB option. You should remessages. If you see some error messages, check the code above to make sure you didn’t key in something wrong. Once youcorrections to the code, go ahead and click Build >> Build Solution again.Step 5: Execute the ProgramOnce you have no syntax errors, to execute or run your program, click Debug on the menu bar and then clickStart DebuggStep 6: Comment the ProgramGo back to the editor and insert meaningful comments that show that you understand what each line of code does.Step 7: Capture the Output1. Run the program again.2. Capture a screen print of your output. (Do a PRINT SCREEN and paste into your MS Word document.)3. Copy your commented code and paste it into your documentEnd of Part BPart C: Payroll ProgramStep 1: Create a New Project1. Make sure you close your previous program by clicking File >> Close Solution.2. Create a new project and name it LAB1C.3. This time, do not delete the code that gets automatically created. Instead, insert your code right between the curly bracesbelow. static void Main(string [] Args) { // your code goes here! }Include a comment box like what you coded in Part B at the very top of your program.Step 1a: Write Your Own ProgramWrite a program that calculates and displays the take-home pay for a commissioned sales employee after deductions are takereceives 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% toher retirement program and 6% to Social Security. Use the Processing Logic provided in Step 2 below as a guide. The programlook something like this:Enter weekly sales: 28,000Total sales: $28,000.00Gross pay (7%): $1,960.00Federal tax paid: $352.80
  5. 5. Social security paid: $117.60Retirement contribution: $196.00Total deductions: $666.40Take home pay: $1,293.60Press any key to continue.Step 2: Processing LogicBasic Logic and FlowchartInput: 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 fede18%. He or she contributes 10% to his or her retirement program and 6% to Social Security.Output: Display the results.Pseudocode:1. Declare variables2. Accept Input – weeklySales3. Calculate Gross Pay = Weekly Sales * .074. Calculate Federal Tax = Gross Pay * .185. Calculate Social Security = Gross Pay * .066. Calculate Retirement = Gross Pay * .107. Calculate Total Deductions = Federal Tax + Social Security + Retirement8. Calculate Total Take Home Pay = Gross Pay – Total Deductions9. Display the following on separate lines and format variables with $ and decimal1. Total Sales Amount: value of weekly sales2. Gross Pay (.07): value of gross pay3. Federal Tax paid (.18): value of federal tax4. Social Security paid (.06): value of social security5. Retirement contribution (.10): value of retirement6. Total Deductions: value of total deductions7. Take Home Pay: value of take home payStep 3: Save ProgramSave your program by clicking File on the menu bar and then clicking Save Program.cs, or by clicking the Savebutton on th+ S.Step 4: Build SolutionTo compile the program, click Debug on the menu bar and then click the Build Solution or Build LabCoption. You should remessages. If you see some error messages, check the code above to make sure you didn’t key in something wrong. Double-clnavigate to its location in the code. Once you make your corrections to the code, go ahead and click Debug >> Build Solution
  6. 6. Step 5: Execute the ProgramOnce you have no syntax errors, to execute or run your program, click Debug on the menu bar and then clickStart Debuggthe right arrow icon or the F5 key.Step 6: Capture the Output1. Capture a screen print of your output. (Do a PRINT SCREEN and paste into your MS Word document.)2. Copy your commented code and paste it into the Word document.End of Part CEND OF LABAfter you have completed your lab, complete the following for each part of the lab (if there are multipleparts).1. Capture a screen print of your output. (Do a PRINT SCREEN and paste into an MS Word document.)2. 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 CIS170B_Lab01_B_LastName_FirstInitial.docx.4. Upload all three projects folder and save the compressed file asCIS170B_Lab01_B_LastName_FirstInitial.Zip.5. Submit both the compressed project file and the Word document to the weekly Dropbox for this lab.Zipping and Submitting Your Project FilesWhen you submit your project files, you will want to send the entire project folder that is created by MSVisual Studio when you create the project, along with your MS Word file. Use your favorite compression toolto zip the full contents of both projects, zip the single zip file, and submit the zip file to your Dropbox.CLICK HERE TO GET THE SOLUTION !!!!!!!!

×