DEVRY CIS 115 F INAL E XAM 2 Check this A+ tutorial guideline at For more classes visit

Slides:



Advertisements
Similar presentations
Programming Logic and Design Sixth Edition
Advertisements

Chapter 3 IFTHENELSE Control Structure © 2008 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. Marilyn Bohl/Maria Rynn Tools for Structured.
ITEC113 Algorithms and Programming Techniques
Objectives In this chapter, you will learn about:
Switch structure Switch structure selects one from several alternatives depending on the value of the controlling expression. The controlling expression.
Chapter 1 Program Design
DCT 1123 Problem Solving & Algorithms
Presented by Joaquin Vila Prepared by Sally Scott ACS 168 Problem Solving Using the Computer Week 12 Boolean Expressions, Switches, For-Loops Chapter 7.
CIS Computer Programming Logic
Programming Logic and Design Fifth Edition, Comprehensive
S2008Final_part1.ppt CS11 Introduction to Programming Final Exam Part 1 S A computer is a mechanical or electrical device which stores, retrieves,
An Object-Oriented Approach to Programming Logic and Design Fourth Edition Chapter 5 Arrays.
Chapter 5: More on the Selection Structure Programming with Microsoft Visual Basic 2005, Third Edition.
An Introduction to Programming with C++ Sixth Edition Chapter 7 The Repetition Structure.
An Object-Oriented Approach to Programming Logic and Design Fourth Edition Chapter 4 Looping.
CS161 Topic #16 1 Today in CS161 Lecture #16 Prepare for the Final Reviewing all Topics this term Variables If Statements Loops (do while, while, for)
1 Program Planning and Design Important stages before actual program is written.
Cosc175/operators1 Algorithms computer as the tool process – algorithm –Arithmetic: addition,subtraction,multiplication,division –Save information for.
The Hashemite University Computer Engineering Department
Topic: Control Statements. Recap of Sequence Control Structure Write a program that accepts the basic salary and allowance amount for an employee and.
Algorithms and Pseudocode
Programming Logic and Design Fifth Edition, Comprehensive Chapter 6 Arrays.
CIS 115 All Exercises Devry University (Devry) For more course tutorials visit CIS 115 All Exercises Devry University.
CIS 115 AID Peer Educator/cis115aid.com FOR MORE CLASSES VISIT
CIS 115 Slingshot Academy / Tutorialrank.com Tutorialrank.com For More Tutorials
CIS 115 All Exercises Devry University (Devry) FOR MORE CLASSES VISIT CIS 115 All Exercises Devry University.
Programming revision Revision tip: Focus on the things you find difficult first.
CIS 115 All Exercises Devry University (Devry) FOR MORE CLASSES VISIT CIS 115 All Exercises Devry University.
CIS 115 ALL EXERCISES DEVRY UNIVERSITY (DEVRY)  CIS 115 All Exercises Devry University CIS 115 ALL ILABS DEVRY UNIVERSITY (DEVRY)  CIS 115 All iLabs.
CIS 115 AID Teaching Effectively/cis115aid.com FOR MORE CLASSES VISIT
PHP Condtions and Loops Prepared by Dr. Maher Abuhamdeh.
DEVRY BIS 155 F INAL E XAMS Check this A+ tutorial guideline at For more classes visit
DEVRY CIS 115 Final Exam 1 Check this A+ tutorial guideline at For more classes visit
DEVRY CIS 115 F INAL E XAM 3 Check this A+ tutorial guideline at For more classes visit
DEVRY CIS 115 F INAL E XAM 3 S ETS OF A NSWERS Check this A+ tutorial guideline at
DEVRY CIS 115 Week 7 Lab Fireworks Stand Checkout Check this A+ tutorial guideline at
DEVRY BSOP 429 F INAL E XAM Check this A+ tutorial guideline at For more classes visit
CIS 115 Slingshot Academy / cis115.com
CST 1101 Problem Solving Using Computers
ALGORITHMS AND FLOWCHARTS
Data Types Variables are used in programs to store items of data e.g a name, a high score, an exam mark. The data stored in a variable is entered from.
Chapter 2: Input, Processing, and Output
Pseudocode Upsorn Praphamontripong CS 1110 Introduction to Programming
The Selection Structure
Chapter 5: Control Structure
Chapter Topics 2.1 Designing a Program 2.2 Output, Input, and Variables 2.3 Variable Assignment and Calculations 2.4 Variable Declarations and Data Types.
Chapter 5: Loops and Files.
Algorithm and Ambiguity
Transition to Code Upsorn Praphamontripong CS 1111
CIS 115 Possible Is Everything/snaptutorial.com
CIS115 Education for Service-- snaptutorial.com
CIS 115Competitive Success/tutorialrank.com
CIS 115 Lessons in Excellence-- cis115.com. CIS 115 All Exercises Devry University (Devry) For more course tutorials visit CIS 115 All.
CIS 115 Education for Service-- tutorialrank.com.
CIS 115 Education for Service-- cis115.com. CIS 115 All Exercises Devry University (Devry) For more course tutorials visit CIS 115 All.
CIS 115 Teaching Effectively-- snaptutorial.com
Arrays, For loop While loop Do while loop
The relational operators
Arrays, Part 1 of 2 Topics Definition of a Data Structure
Starting Out with Programming Logic & Design
Algorithm and Ambiguity
Arrays, Part 1 of 2 Topics Definition of a Data Structure
Algorithms computer as the tool process – algorithm
Programming Logic and Design Fifth Edition, Comprehensive
Chapter 2: Input, Processing, and Output
Arrays, Part 1 of 2 Topics Definition of a Data Structure
Algorithms For use in Unit 2 Exam.
REPETITION Why Repetition?
Presentation transcript:

DEVRY CIS 115 F INAL E XAM 2 Check this A+ tutorial guideline at For more classes visit CIS 115 Final Exam 2 1. What is the first step in software development? 2. What are named locations in a computer’s memory holding information required by a program? 3. What symbol in a flowchart would be used by a developer to represent the beginning or ending point? 4. ) Set name = “BSCIS” is a process. What data type would you expect the variable, name, to have? 5. (You are using dollar amounts in an algorithm. What data type would you assign? 6. What tool is used by developers to design logic using specific shapes/symbols? 7. When a program evaluates mathematical expression, which of the following operators (or mathematical operations) takes precedence? 8. (Which one of the following is a valid assignment statement in a program? 9. (Evaluate (2 * 3) ^ (TCO 2) Review the partial pseudocode below. What is the correct math expression to complete the algorithm and total sales for both regions?

10. (TCO 2) R EVIEW THE PARTIAL PSEUDOCODE BELOW. W HAT IS THE CORRECT MATH EXPRESSION TO COMPLETE THE ALGORITHM AND TOTAL SALES FOR BOTH REGIONS ? P ROMPT “E NTER TOTAL SALES FOR REGION 1: “ I NPUT REGION 1 P ROMPT “E NTER TOTAL SALES FOR REGION 2: “ I NPUT REGION 2 S ET _____ D ISPLAY “ TOTAL SALES : “ + TOTAL (P OINTS : 4) 11. (TCO 3 & 4) R EVIEW THE PSEUDOCODE BELOW. W HAT WILL BE DISPLAYED WHEN THIS ALGORITHM EXECUTES ? S ET I F (( X > = 10) AND ( X D ISPLAY “ THE IF PATH EXECUTES ” E LSE D ISPLAY “ THE ELSE PATH EXECUTES ” E ND I F (P OINTS : 4) 12. (TCO 3 & 4) W HAT VALUE GETS DISPLAYED FOR THE VARIABLE X? S ET S ET S ET I F (B > 15) AND (() OR (C S ET E LSE S ET E ND I F D ISPLAY X (P OINTS : 4)

13. (TCO 3 & 4) I N THE FOLLOWING PSEUDOCODE, WHAT RAISE WILL AN EMPLOYEE IN D EPARTMENT 6 RECEIVE ? I F DEPARTMENT S ET E LSE I F DEPARTMENT S ET E LSE S ET E ND I F E ND I F (P OINTS : 4) 14. (TCO 3 & 4) W HICH OF THE SELECTION STRUCTURES DETERMINE WHETHER THE USER ENTERS A NUMBER OUTSIDE A RANGE OF 5 AND 15? (P OINTS : 4) 15. (TCO 3 & 4) W HAT VALUE GETS DISPLAYED FOR THE VARIABLE Z? S ET S ET S ET I F (( BALANCE <> 800) OR ( STATE C ODE <> 6) OR ( CREDIT C ODE <> 7) THEN S ET E LSE S ET E ND I F D ISPLAY Z (P OINTS : 4) 1. (TCO 5) T HE STATEMENTS EXECUTED WITHIN A LOOP ARE KNOWN COLLECTIVELY AS THE _____. (P OINTS : 4) 2. (TCO 5) W HICH OF THE FOLLOWING STATEMENTS IS FALSE ? (P OINTS : 4) 3. (TCO 5) A DO LOOP IS CONSIDERED WHAT TYPE OF LOOP ? (P OINTS : 4) 4. (TCO 5) W HAT HAPPENS WHEN THE LOOP CONTROL VARIABLE IS NOT CHANGED ? (P OINTS : 4)

5. (TCO 5) H OW MANY TIMES WILL THE FOLLOWING LOOP BE EXECUTED ? S ET DOWHILE NUM D ISPLAY NUM S ET + 1 ENDO (P OINTS : 4) 6. (TCO 7) W HAT IS ANOTHER NAME FOR AN ARRAY ’ S INDEX ? (P OINTS : 4) 7. (TCO 7) S UPPOSE YOU HAVE AN ARRAY NAMED NUMBER, AND TWO OF ITS ELEMENTS ARE NUMBER (1) AND NUMBER (4). Y OU KNOW THAT _____. (P OINTS : 4) 8. (TCO 7) W HICH ONE OF THE FOLLOWING CORRECTLY DECLARES A ZERO - BASED ARRAY OF FOUR INTEGERS ? (P OINTS : 4) 9. (TCO 7) W HEN PROCESSING THE ELEMENTS OF AN ARRAY, WHAT CONTROL STRUCTURE IS USED TO MOVE THROUGH EACH ELEMENT WITHIN THE ARRAY ? (P OINTS : 4) 10. (TCO 7) A ZERO - BASED ARRAY NAMED SALES HAS BEEN DECLARED AND LOADED WITH THE VALUES 100, 1100, 3400, 5550, 3000, 22300, AND W HAT VALUE WILL BE STORED IN THE ARRAY ELEMENT SALES (1)? (P OINTS : 4) 11. (TCO 6) A FILE CONTAINS _____. (P OINTS : 4) 12. (TCO 6) W HAT IS AUTOMATICALLY PLACED AT THE BOTTOM OF A FILE WHEN THE FILE IS CLOSED ? (P OINTS : 4) 13. (TCO 8) M ENU - DRIVEN PROGRAMS NEED TO GIVE THE USER THE OPTION TO _____. (P OINTS : 4) 14. (TCO 9) W HAT TYPE OF ERROR OCCURS WHEN A PROGRAM WILL NOT EXECUTE BECAUSE THE RULES OF THE LANGUAGE HAVE BEEN VIOLATED ? (P OINTS : 4) 15. (TCO 2) T HE FIRST MODULE IS USUALLY CONSIDERED TO BE CALLED THE _____ MODULE. (P OINTS : 4) 1. (TCO 10) A RETAIL STORE IS HAVING A CUSTOMER APPRECIATION SALE. D EPENDING ON THE TOTAL DOLLARS PURCHASED, THE CUSTOMER COULD RECEIVE A DISCOUNT ON HIS OR HER TOTAL PURCHASES. Y OU ARE TO DEVELOP PSEUDOCODE THAT WILL OBTAIN THE TOTAL DOLLARS PURCHASED FROM THE USER, DETERMINE THE DISCOUNT PERCENTAGE, AND DISPLAY THE TOTAL AMOUNT DUE. W HEN THE PURCHASES ARE MORE THAN $100, THE DISCOUNT IS 10%. W HEN THE PURCHASES ARE $100 OR LESS, THE DISCOUNT IS 5%. (P OINTS : 10) 2. (TCO 10) A SMALL BUSINESS IN YOUR NEIGHBORHOOD WOULD LIKE AN APPLICATION DEVELOPED THAT DETERMINES THE AVERAGE DOLLAR AMOUNT SPENT FOR EVERY THREE PURCHASES. T HE USER WILL ENTER THREE DIFFERENT PURCHASE AMOUNTS. Y OU NEED TO DISPLAY THE AVERAGE TO YOUR CLIENT. C OMPLETE THE PSEUDOCODE TO DESIGN YOUR LOGIC. (P OINTS : 10) 3. (TCO 9 & 10) T HERE IS A LOGIC ERROR IN THE FOLLOWING PSEUDOCODE. T HE LOOP NEEDS TO EXECUTE FOUR TIMES. W HAT STATEMENT ( S ) WOULD YOU NEED TO ADD OR CHANGE TO CORRECT THE LOGIC ? B E SURE TO EXPLAIN WHY YOU ARE ADDING OR CHANGING THE STATEMENTS.

Set REPEAT Set + 1 UNTIL total <> EndWhile Display total (Points : 10) 4. (TCO 4 & 10) Complete the pseudocode by rewriting the algorithm. The design is determining the correct sales tax depending on the county identifying code. Counties with a number less than 10 have a 6% sales tax. The 11–25 codes have a sales tax of 7%. Codes above 25 have a sales tax of 8%. The code is entered by the user. Begin Declare Real salesTax Declare _____ countyCode _____ “Enter the county code: “ _____ countyCode If _____ Set Else If _____ AND _____ then Set Else _____ EndIf _____ Display “the sales tax is: “ + _____ End (Points : 10)

B EGIN D ECLARE S TRING COLOR 1 D ECLARE S TRING COLOR 2 D ECLARE S TRING CONTROL 1 D ECLARE S TRING CONTROL 2 _____ “E NTER FIRST PRIMARY COLOR : “ I NPUT _____ P ROMPT “E NTER THE SECOND PRIMARY COLOR : “ I NPUT _____ S ET CONTROL 1 = “ N ” DOWHILE CONTROL 1 = “ N ” I F ( COLOR 1 <> “ YELLOW ”) _____ ( COLOR 1 <> “ RED ”) _____ ( COLOR 1 <> “ BLUE ”) THEN P ROMPT “ FIRST PRIMARY COLOR IS INVALID ” I NPUT _____ E LSE S ET CONTROL 1 = “ Y ” ENDO S ET CONTROL 2 = “ N ” DOWHILE CONTROL 2 = “ N ” I F ( COLOR 2 <> “ YELLOW ”) _____ ( COLOR 2 <> “ RED ”) _____ ( COLOR 2 <> “ BLUE ”) THEN P ROMPT “ SECOND PRIMARY COLOR IS INVALID ” I NPUT COLOR 2 E LSE S ET CONTROL 2 = “ Y ” ENDO I F ( COLOR 1 = “ RED ”) AND (_____) THEN D ISPLAY “ SECONDARY COLOR IS : PURPLE ” E ND I F