Presentation is loading. Please wait.

Presentation is loading. Please wait.

DEVRY COMP 122 L AB 2 L AB R EPORT AND S OURCE C ODE C HECK THIS A+ TUTORIAL GUIDELINE AT HTTP :// WWW. ASSIGNMENTCLOUD. COM / COMP -122/ COMP LAB.

Similar presentations


Presentation on theme: "DEVRY COMP 122 L AB 2 L AB R EPORT AND S OURCE C ODE C HECK THIS A+ TUTORIAL GUIDELINE AT HTTP :// WWW. ASSIGNMENTCLOUD. COM / COMP -122/ COMP LAB."— Presentation transcript:

1 DEVRY COMP 122 L AB 2 L AB R EPORT AND S OURCE C ODE C HECK THIS A+ TUTORIAL GUIDELINE AT HTTP :// WWW. ASSIGNMENTCLOUD. COM / COMP -122/ COMP -122- LAB -2- LAB - REPORT - AND - SOURCE - CODE F OR MORE CLASSES VISIT HTTP :// WWW. ASSIGNMENTCLOUD. COM COMP 122 W EEK 2 I L AB C OMPLETE THE FOLLOWING TWO PROGRAMS : P ROGRAMMING P ROBLEM 1 W RITE A PROGRAM THAT CALCULATES AND OUTPUTS THE MONTHLY PAYCHECK INFORMATION FOR AN EMPLOYEE, INCLUDING ALL THE AMOUNTS DEDUCTED FROM AN EMPLOYEE ’ S GROSS PAY, AND THE NET PAY THAT IS DUE TO THE EMPLOYEE. T HE USER OF YOUR PROGRAM WILL KNOW THE EMPLOYEE ’ S NAME AND THE GROSS PAY FOR THE EMPLOYEE. E ACH EMPLOYEE HAS THE FOLLOWING DEDUCTIONS TAKEN FROM HIS GROSS PAY : F EDERAL I NCOME T AX : 15% S TATE T AX : 3.5% HTTP :// WWW. ASSIGNMENTCLOUD. COM / COMP -122/ COMP -122- LAB -2- LAB - REPORT - AND - SOURCE - CODE HTTP :// WWW. ASSIGNMENTCLOUD. COM

2 S OCIAL S ECURITY + M EDICARE T AX : 8.5% H EALTH I NSURANCE $75 T HE OUTPUT FROM YOUR PROGRAM SHOULD BE STRUCTURED AS IS DISPLAYED BELOW : B ILL R OBINSON G ROSS A MOUNT :............ $3575.00 F EDERAL T AX :............. $ 536.25 S TATE T AX :............... $ 125.13 S OCIAL S EC / M EDICARE :... $ 303.88 H EALTH I NSURANCE :........ $ 75.00 N ET P AY :................. $2534.75 Y OUR PROGRAM SHOULD DEAL WITH ERRONEOUS INPUT VALUES. G ROSS SALARY SHOULD ALWAYS BE A POSITIVE NUMBER. M AKE SURE THAT YOU DEAL WITH THE POSSIBILITY THAT THE USER MAY HAVE ENTERED A NON - NUMERIC INPUT VALUE. H AVE YOUR PROGRAM OUTPUT APPROPRIATE ERROR MESSAGES IN THESE CASES. 1. I DENTIFY THE INPUTS AND OUTPUTS OF THE PROBLEM. 2. I DENTIFY THE PROCESSING NEEDED TO CONVERT THE INPUTS TO THE OUTPUTS. 3. D ESIGN AN ALGORITHM IN PSEUDO CODE TO SOLVE THE PROBLEM. M AKE SURE TO INCLUDE STEPS TO GET EACH INPUT AND TO REPORT EACH OUTPUT. I NCLUDE STEPS TO DEAL WITH ERROR CASES. 4. I DENTIFY THREE TEST CASES, ONE USING A POSITIVE NUMBER, AND ONE USING A NEGATIVE NUMBER, AND ONE USING INCORRECT INPUT ( IE. I NPUT A LETTER RATHER THAN A DIGIT FOR THE NUMERIC INPUT ). F OR EACH OF THE THREE TEST CASES SHOW WHAT INPUTS YOU WILL USE AND WHAT YOUR EXPECTED OUTPUTS SHOULD BE.

3 5. W RITE THE PROGRAM TO IMPLEMENT YOUR ALGORITHM. T EST YOUR PROGRAM USING YOUR TEST CASES. P ROGRAMMING P ROBLEM 2 I N A RIGHT TRIANGLE, THE SQUARE OF THE LENGTH OF ONE SIDE IS EQUAL TO THE SUM OF THE SQUARES OF THE LENGTHS OF THE OTHER TWO SIDES. S TEPHANIE HAS THE INTEGER LENGTHS OF THREE SIDES OF A TRIANGLE AND NEEDS TO KNOW IF IT IS A RIGHT TRIANGLE. W RITE A PROGRAM TO SOLVE THIS PROBLEM. NOTE: T HE USER MUST BE ALLOWED TO INPUT THE VALUES OF THE SIDES IN ANY ORDER! 1. I DENTIFY THE INPUTS AND OUTPUTS OF THE PROBLEM. 2. I DENTIFY THE PROCESSING NEEDED TO CONVERT THE INPUTS TO THE OUTPUTS. 3. D ESIGN AN ALGORITHM IN PSEUDOCODE TO SOLVE THE PROBLEM. M AKE SURE TO INCLUDE STEPS TO GET EACH INPUT AND TO REPORT EACH OUTPUT. 4. I DENTIFY FIVE SIGNIFICANT TEST CASES INCLUDING ONE FOR INCORRECT INPUT ( IE. I NPUT A LETTER RATHER THAN A DIGIT FOR THE NUMERIC INPUT ). (T HINK ABOUT WHAT IMPACT CHANGING THE ORDER OF THE INPUT VALUES SHOULD HAVE ON YOUR PROGRAM !) F OR EACH OF THE FIVE TEST CASES SHOW WHAT INPUTS YOU WILL USE AND CALCULATE WHAT YOUR EXPECTED OUTPUTS SHOULD BE.


Download ppt "DEVRY COMP 122 L AB 2 L AB R EPORT AND S OURCE C ODE C HECK THIS A+ TUTORIAL GUIDELINE AT HTTP :// WWW. ASSIGNMENTCLOUD. COM / COMP -122/ COMP LAB."

Similar presentations


Ads by Google