понедельник, 19 октября 2015 г.

ECO 450 Entire Course All Weeks Discussion Question, Quizzes, Assignments + Final Exam


ECO 450 Week 1 DQ 1 The Basics
ECO 450 Week 1 DQ 2 Government Expenditures
ECO 450 Week 2 DQ 1 Markets and Efficiency
ECO 450 Week 2 DQ 2 Externalities
ECO 450 Week 2 Quiz
ECO 450 Week 3 DQ 1 Public versus Private Goods
ECO 450 Week 3 DQ 2 The Political Process
ECO 450 Week 3 Quiz
ECO 450 Week 4 Assignment 1 Social Security Insolvency
ECO 450 Week 4 DQ 1 Cost-Benefit Analysis
ECO 450 Week 4 DQ 2 Government Assistance Programs
ECO 450 Week 4 Quiz
ECO 450 Week 5 DQ 1 Retirement and the Social Security System
ECO 450 Week 5 DQ 2 The U.S. Health Care Dilemma
ECO 450 Week 5 Mid Term
ECO 450 Week 6 DQ 1 Taxation and Government Finance
ECO 450 Week 6 DQ 2 Evaluating Alternative Methods to Finance Government
ECO 450 Week 6 Quiz
ECO 450 Week 7 DQ 1 Taxation and Income
ECO 450 Week 7 DQ 2 The National Debt
ECO 450 Week 7 Quiz
ECO 450 Week 8 Assignment 2 The Value-Added Tax Is It Good for the United States
ECO 450 Week 8 DQ 1 The U.S. Tax System
ECO 450 Week 8 DQ 2 Personal Income Tax
ECO 450 Week 8 Quiz
ECO 450 Week 9 DQ 1 Corporate Income Tax
ECO 450 Week 9 DQ 2 Taxation on Consumption and Sales
ECO 450 Week 9 Quiz
ECO 450 Week 10 DQ 1 Wealth and Taxation
ECO 450 Week 10 DQ 2 Government Finance
ECO 450 Week 10 Quiz
ECO 450 Week 11 DQ 1 Government Policies on Health Care and Taxation
ECO 450 Week 11 DQ 2 Public Finance and You
ECO 450 Week 11 Final Exam Part 1
ECO 450 Week 11 Final Exam Part 2

CIS336 Final Exam 1


1. (TCO 1) Most DBMS are referred to as _____________database management systems. (Points : 4)
elemental
linked
hierarchical
relational
2. (TCO 1) Data constitutes the building blocks of _____________. (Points : 4)
information
processing
applications
programming
3. (TCO 2) If a foreign key contains either matching values or nulls, the table(s) that make use of such a foreign key is/are said to exhibit __________ integrity. (Points : 4)
referential
restrictive
secondary
redundant
4. (TCO 2) In a "one-to-many" relationship, which constraint is usually added to the "many" table?
(Points : 4)
UNIQUE
PRIMARY KEY
FOREIGN KEY
NOT NULL
5. (TCO 3) A ____ occurs when a relationship is improperly or incompletely identified and, therefore, is represented in a way that is not consistent with the real world. (Points : 4)
surrogate primary keys
time-variant data
design trap
fan trap
6. (TCO 3) All of the following are true about a prime attribute except_____________. (Points : 4)
it is a key attribute
it is at least part of a key
it is not a key attribute
it may be part of a composite key
7. (TCO 3) The conflicts between design efficiency, information requirements, and processing speed are often resolved through_____________. (Points : 4)
conversion from 1NF to 2NF
conversion from 2NF to 3NF
compromises that include denormalization
conversion from 3NF to 4NF
8. (TCO 4) When a constraint is created at the ______ level with the CREATE TABLE command, the constraint definition is simply included as part of the column definition.(Points : 4)
table
column
database
row
Page 2 - Multiple Choice
1. (TCO 4) In Oracle, the CONSTRAINT clause is used to ___________________. (Points : 4)
create only referential constraints
define and name any constraint
create a short cut so the constraint does not have to be named
create only entity entegrity constraints
2. (TCO 4) The SQL command that lets you list the table contents is (Points : 4)
insert.
select.
commit.
update.
rollback.
3. (TCO 5) The Crow's Foot model is more ___________-oriented than the Chen model. (Points : 4)
object
user
implementation
processor
4. (TCO 5) The ___________ model is both software and hardware dependent. (Points : 4)
conceptual
logical
condensed
physical
5. (TCO 6) Which of the following commands will add a new column named FIRSTORDERDATE to the CUSTOMERS table to store the date that the customer first placed an order with the company? (Points : 4)
CREATE COLUMN firstorderdate, DATE TO customers;
ALTER TABLE customers ADD COLUMN firstorderdate DATE;
ALTER TABLE customers ADD firstorderdate DATE;
ALTER TABLE customers ADD (firstorderdate DATE);
6. (TCO 6) When modifying the data characteristics of a column in Oracle, which of the following is correct? (Points : 4)
The column size can be increased.
The size of the column can be decreased.
Changing the default value of a column will change the values of data already in a table.
If a NUMBER column is empty, its precision and scale cannot be changed.
7. (TCO 6) Which of the followig SQL commands would alter the table DEVRY and add a foreign key that references the CITY table? (Points : 4)
ALTER table DEVRY
ADD CONSTRAINT devry_studentcity_fk references city;
ALTER table DEVRY
ADD CONSTRAINT devry_studentcity_fk FOREIGN KEY references city;
ALTER table DEVRY
ADD CONSTRAINT devry_studentcity_fk FOREIGN KEY (student_city) references city;
ALTER table DEVRY
ADD CONSTRAINT FOREIGN KEY (student_city) references city;
8. (TCO 7) Given a table named EMPLOYEE, the SQL command to sort records in a specific order would be: (Points : 4)
SELECT EMP_LNAME, EMP_FNAME, EMP_INITIAL, EMP_AREACODE, EMP_PHONE
FROM EMPLOYEE
LIST BY EMP_LNAME, EMP_FNAME, EMP_INITIAL;
SELECT EMP_LNAME, EMP_FNAME, EMP_INITIAL, EMP_AREACODE, EMP_PHONE
FROM EMPLOYEE
ORDER BY EMP_LNAME, EMP_FNAME, EMP_INITIAL;
SELECT EMP_LNAME, EMP_FNAME, EMP_INITIAL, EMP_AREACODE, EMP_PHONE
FROM EMPLOYEE
DISPLAY BY EMP_LNAME, EMP_FNAME, EMP_INITIAL;
SELECT EMP_LNAME, EMP_FNAME, EMP_INITIAL, EMP_AREACODE, EMP_PHONE
FROM EMPLOYEE
SEQUENCE BY EMP_LNAME, EMP_FNAME, EMP_INITIAL;
Page 3 - Multiple Choice
1. (TCO 7) Which of the following subqueries returns more than one row of results to the outer query? (Points : 4)
multiple-column subquery
single-row subquery
multiple-row subquery
correlated subquery
2. (TCO 7) Which of the following keywords can be used to join two tables that do not contain a commonly named and defined column? (Points : 4)
NATURAL JOIN
JOIN...ON
JOIN...USING
JOIN...WHERE
3. (TCO 8) Based upon the contents of the BOOKS table shown below, which of the following SQL statements will return the number of categories contained in the table?
(Points : 4)
SELECT COUNT(DISTINCT category) FROM books;
SELECT DISTINCT COUNT(category) FROM books;
SELECT DISTINCT (COUNT(category)) FROM books;
SELECT DISTINCT COUNT(category) FROM books;
4. (TCO 8) The _____________ function can be used to display upper-case characters in lower-case. (Points : 4)
CONVERT
MIN
LESS
LOWER
5. (TCO 8) Which of the following statements will produce the value 21.1? (Points : 4)
SELECT ROUND(21.12, 1) FROM dual;
SELECT ROUND(21.12, -1) FROM dual;
SELECT ROUND(21.12, 0) FROM dual;
SELECT ROUND(21.12, 0+) FROM dual;
6. (TCO 9) The column to be updated by the UPDATE command is specified in the ______ clause. (Points : 4)
UPDATE
SET
WHERE
COL
7. (TCO 9) If the INSERT INTO command is used to insert data values that violate an existing constraint in a table, which of the following will happen. (Points : 4)
Oracle will raise an error and you will have to go update the incorrect data.
Oracle will raise an error and the entire row will be rejected.
Oracle will raise an error and the invalid piece of data will be rejected.
Oracle will raise and error and all current transactions will be rolled back.
8. (TCO 10) Which of the following commands is used to establish a user account? (Points : 4)
CREATE NEW USER username
IDENTIFIED BY password;
CREATE USERNAME username
IDENTITY password;
CREATE USER username PASSWORD password;
CREATE USER username IDENTIFIED BY password;
9. (TCO 10) Which command will grant a system privilege to a user? (Points : 4)
GRANT systemprivilege USERNAME username
GRANT PRIVILEGE systemprivilege TO username
GRANT systemprivilege TO
username 
GRANT systemprivilege ON
username

CIS336 Final Exam 2


1. (TCO 1) Most DBMS are referred to as _____________database management systems. (Points : 4)
elemental
linked
hierarchical
relational
2. (TCO 1) A relational DBMS provides protection of the _______________________ through security, control, and recovery facilities. (Points : 4)
user
network
system
database
3. (TCO 2) If a foreign key contains either matching values or nulls, the table(s) that make use of such a foreign key is/are said to exhibit __________ integrity. (Points : 4)
referential
restrictive
secondary
redundant
4. (TCO 2) A field that consists of integer values is a _________ type field. (Points : 4)
Date/Time
Yes/No
Memo
Numeric
5. (TCO 3) The PK must uniquely identify each entity instance. A primary key must be able to guarantee unique values. It cannot contain nulls. This rationale belongs to ____. (Points : 4)
Unique values
Nonintelligent
Preferably single-attribute
Security complaint
6. (TCO 3) A table that is in 1NF and includes no partial dependencies only is said to be in_____________. (Points : 4)
1NF.
2NF.
3NF.
4NF.
BCNF.
7. (TCO 3) A table that has all key attributes defined, has no repeating groups, and all its attributes are dependent on the primary key, is said to be in_____________.(Points : 4)
1NF.
2NF.
3NF.
4NF.
BCNF.
8. (TCO 4) In Oracle, the DEFAULT constraint is used to ____________________. (Points : 4)
define which column is the default primary key if one is not explicitly named
define which column is the default foreign key if on is not explicitly named
assign a value to an attribute when a new row is added and a value is not defined
validate data when a value is added to an attribute
Page 2 - Multiple Choice
1. (TCO 4) Which of the following is not considered a database object? (Points : 4)
a table
a view
a constraint
a sequence
an index
2. (TCO 4) Which of the following SQL statements would you use to create a table named DEVRY? (Points : 4)
CREATE Devry
(
Student_id NUMBER (12),
Student_name VARCHAR2 (15),
Student_city VARCHAR2 (12)
);
CREATE TABLE Devry
(
Student_id NUMBER (12)
Student_name VARCHAR2 (15)
Student_city VARCHAR2 (12)
);
CREATE TABLE Devry
(
Student_id NUMBER (12),
Student_name VARCHAR2 (15),
Student_city VARCHAR2 (12)
);
CREATE TABLE Devry
Student_id NUMBER (12),
Student_name VARCHAR2 (15),
Student_city VARCHAR2 (12);
3. (TCO 5) The ____ constraint requires that a specific condition be met before a record can be added to a table. (Points : 4)
UNIQUE
REFERENCE
CONDITION
CHECK
4. (TCO 5) The ___________ model is both software and hardware dependent. (Points : 4)
conceptual
logical
condensed
physical
5. (TCO 6) The _________________________ statement can be used to enable or disable a constraint. (Points : 4)
alter table
modify table
create table
update table
6. (TCO 6) When using the ALTER TABLE...DROP COLUMN command, which of the following is not correct? (Points : 4)
The command's effect on the table is permanent.
You cannot delete the last remaining column in a table.
The command deletes both the column and its contents.
The command can be used to delete multiple columns from a table.
7. (TCO 6) Which of the following keywords can be used to change the size, datatype, and/or default value of an existing column? (Points : 4)
ADD
MODIFY
CHANGE
RESET
8. (TCO 7) Any type of subquery can be used in the _________ clause of a SELECT statement. (Points : 4)
WHERE
HAVING
FROM
ORDER BY
GROUP
Page 3 - Multiple Choice
1. (TCO 7) Using the BOOK_CUSTOMER and BOOK_ORDER tables shown below for references, which SQL statement will return the same results as the following SQL statement?

SELECT * FROM book_customer, book_order;
(Points : 4)
SELECT * FROM book_order CROSS JOIN book_customer;
SELECT * FROM book_order, book_customer
WHERE book_order.customer# = book_customer.customer#;
SELECT * FROM book_order, book_customer
WHERE book_order.customer# > book_customer.customer#;
SELECT * FROM o book_order , c book_customer
WHERE o.customer# = c.customer#;
2. (TCO 7) If a Cartesian join is used to link table A which contains five rows to table B which contains eight rows, there will be _______ rows in the results. (Points : 4)
8
13
5
40
3. (TCO 8) Based upon the contents of the BOOK_ORDER table shown below, which of the following SQL statements will display the ship date for order 1006 as April 2, 2002?
(Points : 4)
SELECT order#, TO_CHAR(shipdate, 'fmMonth DD, YYYY')
FROM book_order;
SELECT order#, TO_DATE(shipdate, 'fmMonth DD, YYYY')
FROM book_order;
SELECT order#, TO_CHAR(shipdate, 'Month DD, YYYY')
FROM book_order;
SELECT order#, TO_DATE(shipdate, 'Month DD, YYYY')
FROM book_order;
4. (TCO 8) Based upon the contents of the BOOK_ORDER table shown below, which of the following SQL statements will display only those orders shipped to the zip code zone that begins with 323?
(Points : 4)
SELECT order#, SUBSTR(shipzip, 1, 323)
FROM book_order;
SELECT order#, SUBSTR(shipzip, 1, 323)
FROM book_order
WHERE ;
SELECT order#
FROM book_order
WHERE (shipzip, 1, 323);
SELECT order#
FROM book_order
WHERE SUBSTR(shipzip, 1, 3) = 323;
5. (TCO 8) Which of the following functions determines the number of characters in a character string? (Points : 4)
COUNT
NUMBER
LENGTH
DECODE
6. (TCO 9) Which of the following is not a valid SQL command? (Points : 4)
UPDATE acctmanager SET WHERE ;
UPDATE acctmanager SET (amname);
UPDATE acctmanager SET (amname) WHERE ;
UPDATE acctmanager WHERE ;
7. (TCO 9) Using the promotion table shown below, which of the following SQL statements will insert a new row into the PROMOTION table?



(Points : 4)
INSERT INTO promotion (gift, minretail, maxretail)
VALUES (FREE BOOK, 75.01, 89.99);
INSERT INTO promotion (gift, minretail, maxretail)
VALUES ('FREE BOOK', 75.01, 89.99);
INSERT INTO promotion VALUES (FREE BOOK, 75.01, 89.99);
INSERT INTO promotion (gift, minretail)
VALUES (FREE BOOK, 75.01, 89.99);
8. (TCO 10) A ____ is a uniquely identifiable object that allows a given person to log on to the database. (Points : 4)
user
role
profile
manager
9. (TCO 10) Which command will delete a user account from Oracle9i? (Points : 4)
DELETE USER username;
DELETE USER username IDENTIFIED BY password;
DROP USER username IDENTIFIED BY password;
DROP USER username;
Page 4 - Essays
1. (TCO 2) What is Character data? (Points : 15)
2. (TCO 3) Explain the term "second normal form". (Points : 15)
3. (TCO 7) Sally needs to find all employees who have a date-of-hire between 01-JAN-2003 and 01-JAN-2005. She writes and executes the following query:
4. (TCO 8) In using group functions we cannot place a group function in a WHERE clause. Explain how the WHERE clause and HAVING clause are similar and why you can use the HAVING with a group function but not a WHERE clause. (Points : 15)
5. (TCO 6) Write the SQL statement that will remove the database table EMPLOYEE. (Points : 15)
1. (TCO 7) Write a join query using NATURAL JOIN that for every order in the ORDERS table will list the order number and order date along with the cusnumber, last name, and first name of the customer who placed the order.
2. (TCO 8) Write a query that will list the part number, part description, and on-hand value (units on hand * unit price) for each part in item class AP. Give the expression an alias of "On Hand Value".
3. (TCO 8) Write a sub query that will list the part number, part description, and units on hand of all parts where the number of units on hand is greater than the average of units on hand for all parts.
4. (TCO 7) Using the BETWEEN operator, write a query that will list all details about all orders that were placed during the period of September 3rd thru September 5th of 1998.
5. (TCO 7) Write a query that will list the part number and part description for all parts in the PART table.
(Points : 15)

CIS336 Final Exam 3


1. (TCO 2) Explain what physical independence means. (Points : 15)
2. (TCO 8) Sally wants to query the EMP table and determine how many of the employees live in each of the cities the company has factories in. She writes the following query but it does not work. What is wrong with the way the query is constructed?
3. (TCO 3) Explain in what two specific cases presented in the text composite primary keys are particularly useful. (Points : 15)
4. (TCO 7) How are comparisons done on character string data in a queries WHERE clause, and why would this be especially useful in comparing certain attributes? (Points : 15)
5. (TCO 6) Oracle will not allow the changing of a column's data type unless the column is empty, and even then it may still be prohibited. Discuss why? (Points : 15)
6. (TCO 7) Write a join query using NATURAL JOIN that for every order in the ORDERS table will list the order number and order date along with the cusnumber, last name, and first name of the customer who placed the order.
7. (TCO 8) Write a query that will list the part number, part description, and on-hand value (units on hand * unit price) for each part in item class AP. Give the expression an alias of "On Hand Value".
8. (TCO 8) Write a query that will display the customer number, first name, and last name for every customer with a balance greater than $50. Display the first and last name as a single column and provide an alias for the column.
9. (TCO 7) Write a query that will list the customer number, last name, and first name for every customer represented by sales rep 03 or sales rep 12.
10. (TCO 7) Write a query that will list the customer first and last name and the sales rep commission rate using JOIN ON.

CIS336 Final Exam 4


1. (TCO 7) For every order, list the order number, order date, part number, part description, and item class for each part that makes up the order.
2. (TCO 8) Write a query that will display the customer number, last name, and first name for every customer I whose first name begins with the letter "D".
2. (TCO 8) Write a query that will display the earliest date an order was placed.
3. (TCO 7) Using the BETWEEN operator, write a query that will list all details about all orders that were placed during the period of September 3rd thru September 5th of 1998.
5. (TCO 7) Write a query that will list the customer first and last name and the sales rep commission rate using JOIN ON.

CIS336 Final Exam 4 Sets of Answers


BIS155 Final Exam


1. (TCO 1) You work for a local construction firm, "DeVry Engineering Group" and your supervisor wants to test your knowledge and skills with Microsoft Excel and has instructed you to develop a spreadsheet to calculate weekly payroll for “15” employees with the following assumptions:

Note: This is a one part question.

• Each employee could have a standard hourly rate between $10.00 and $30.00 per hour.
• Each employee qualifies to earn overtime at a rate of 1.5 of his or her hourly rate for every hour greater than 40 hours.
• Each employee will have a standard 7.65% deduction for social security
• Each employee will have a standard 14.00% deduction for Federal Taxes
• Each employee will have a standard 5.33% deduction for State Taxes
Explain how you will structure and format your worksheet, including titles, column headings, and formulas to calculate payroll variables for each employee to determine "Net Pay" including and not limited to Total Hours, Gross Pay, Social Security Tax, Federal Withholding Tax, and Sate Withholding Tax. In addition, determine how you would extract overtime hours from a calculated value of "Total Hours" using a conditional formula.

In addition, your supervisor will need this weekly payroll report on a weekly basis and instructed you to keep the payroll history of all weeks within "1" workbook but has allowed you to decide if you would rather keep the payroll running on one worksheet or by assigning a new worksheet for each week. Using your knowledge learned in this class, descriptively explain whether you would keep all weekly payrolls in one worksheet or assigned to new worksheets by week. Defend your reasoning's on the approach your take based on what you have learned in this course.
(Points : 40)

2. (TCO 3) You currently work for an automotive parts supply store. Your company is growing and is considering expansion. The company currently has three locations (North, South, and Central) in one state. Each parts supply store carries inventory in four categories. You have been presented with the sales figures for the last three years for each location and inventory category by store. Based on this information, you're tasked with analyzing current sales for each store by category and overall total sales by store and category.
Note: This is a four part question.

1.) Explain your approach to setting up your worksheets and organizing the data.

2.) Explain how you will visually represent the data for the total sales of the individual inventory categories for each location for the time periods shown.

3.) Explain how you will visually represent the consolidated data for the sales of all stores and all inventory categories for all time periods in one chart or graph.

4.) Once you have finished the above tasks, you plan to send the Excel workbook to your manager for evaluation. Your manger is presenting your findings to the Board of Directors for justification for additional capital expenditures. The visually representations need to be concise and clear by able to support the requested expenditures. Explain how you would use the integration features of MS Office to incorporate the Excel information into other presentation media.
(Points : 40)

3. (TCO 4) You are given a spreadsheet with daily sales numbers ordered by date from January 1st to December 31st. You have been tasked with finding the average sales of each month, then to reorder the months so they are listed in order from highest to lowest average sales. Give a step-by-step explanation of how you will rearrange the data so you can analyze the best and worst months.
Note: This is a one part question.
(Points : 40)

4. (TCO 5) You've just joined the staff of the XYZ Manufacturing Company (XYZ, for short). XYZ manufactures only one product, the gizmo. It comes in two sizes, the mini-gizmo and the magna-gizmo. Both are difficult to manufacture, and consequently, the company closely monitors rejected units. The company has three locations, each of which produces both the mini and the magna-gizmos. You are automating the weekly production reports so that you can easily calculate total production for the entire company each week.
The mini-gizmo is priced at $3.25 per unit. The magna-gizmo is priced at $7.00 per unit. The unit cost for a reject mini-gizmo is $1.75. The cost for a reject magna-gizmo is $3.50. Respond fully to the following questions regarding this task:
Note: This is a two part question.
1.) The managers will e-mail their weekly reports to you on Monday of the following week. You will then produce the summary report. Explain the process for doing this. Give a sample formula to total the number of mini-gizmos produced by the entire company in a week.
2.) Each week, you will present the combined report to your boss, who wants to see both the summary and the individual sheets for each location. You want to add a header with the date and your name to each page. What is the easiest way to do this? Explain the process.
(Points : 40)

5. (TCO 9) You have been tasked with analyzing an extremely large amount of data and to ultimately produce a report to share with the board of directors. The data is currently in a text file and has over two thousand records of data. Explain how you would use Excel to analyze this data and organize it to prepare a written report. Be very specific on the variety of tools you would use and the steps you would go through to analyze the data and to ultimately prepare a detailed report with recommendations.

CIS115 Final Exam 1


1. (TCO 1) What does IPO of IPO Model stand for? (Points : 4)
2. (TCO 1) What is a data item with a name and a value that remain the same during the execution of a program? (Points : 4)
3. (TCO 1) What symbol in a flowchart would be used by a developer to represent an input or output operation? (Points : 4)
4. (TCO 1) Set is a process. What data type would you expect the variable, name, to have? (Points : 4)
5. (TCO 1) You are using dollar amounts in an algorithm. What data type would you assign? (Points : 4)
6. (TCO 2) What tool is used by developers to design logic using specific shapes/symbols? (Points : 4)
7. (TCO 2) When a program evaluates mathematical expression, which of the following operators (or mathematical operations) has the lowest precedence? (Points : 4)
8. (TCO 2) Using the assignment statement, + sales, which side of the equal sign is evaluated first? (Points : 4)
9. (TCO 2) What value will be contained in the variable, x, after the following statement is executed?
* 5 / 10 + 6 (Points : 4)
10. (TCO 2) Review the partial pseudocode below. What is the correct math expression to complete the algorithm and total sales for both regions?
Prompt “Enter total sales for region 1: ”
Input region1
Prompt “Enter total sales for region 2: ”
Input region2
Set _____
Display “total sales: ” + total (Points : 4)
11. (TCO 3 & 4) Review the pseudocode below. What will be displayed when this algorithm executes?
Set
If ((x > 10) AND (x < 20))="">
Display “the IF path executes”
Else
Display “the ELSE path executes”
EndIf (Points : 4)
12. (TCO 3 & 4) What value gets displayed for the variable X?
Set
Set
Set
If (B > 15) AND (() OR (C <= 15))="">
Set
Else
Set
EndIf
Display X (Points : 4)
13. (TCO 3 & 4) In the following pseudocode, what raise will an employee in Department 6 receive?
If department < 2="">
Set
Else
If department < 6="">
Set
Else
Set
EndIf
EndIf (Points : 4)
14. (TCO 3 & 4) Which of the selection structures determines if the user enters a number between 20 and 45? (Points : 4)
15. (TCO 3 & 4) What value gets displayed for the variable Z?
Set
Set
Set
If ((balance <> 800) OR (stateCode <> 6) OR (creditCode <> 7) then
Set
Else
Set
EndIf
Display Z (Points : 4)
1. (TCO 5) The variable used to create an expression controlling the loop is known as the _____. (Points : 4)
2. (TCO 5) Which of the following statements is false? (Points : 4)
3. (TCO 5) Which control structure is classified as a loop? (Points : 4)
4. (TCO 5) Repetition that loops a certain number of times is typically referred to as _____. (Points : 4)
5. (TCO 5) How many times will the following loop be executed?
Set
DOWHILE x <> 7
Display x
Set + 1
ENDO (Points : 4)
6. (TCO 7) What is a subscript or an index? (Points : 4)
7. (TCO 7) Suppose you have an array named number and two of its elements are number(1) and number(4). You know that _____. (Points : 4)
8. (TCO 7) What is the value of the index used to access the last element in a zero-based array declared as num(12)? (Points : 4)
9. (TCO 7) When loading/initializing the elements of an array, what control structure is used to move through each element within the array? (Points : 4)
10. (TCO 7) A zero-based array named sales has been declared and loaded with the values: 100, 1100, 3400, 5550, 3000, 22300, 1200. What value will be stored in the array element, sales(2)? (Points : 4)
11. (TCO 6) A record contains _____. (Points : 4)
12. (TCO 6) What are the three modes of operation on a file? (Points : 4)
13. (TCO 8) Many algorithms require direct communication from users. These types of algorithms are called _____. (Points : 4)
14. (TCO 9) What type of error occurs when an array subscript’s value goes beyond the total number of elements in the array? (Points : 4)
15. (TCO 2) What type of variable can be accessed by any module within the design? (Points : 4)
1. (TCO 10) A department store is having a customer appreciation sale. Depending on the total dollars purchased, the customer could receive a discount on total purchases. You are to develop pseudocode that will obtain the total dollars purchased from the user, determine the discount percent, and display the total amount due. When the purchases are more than $500, the discount is 10%. When the purchases are $500 or less, the discount is 6%. (Points : 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. The user will enter three different purchase amounts. You need to display the average to your client. Complete the pseudocode to design your logic. (Points : 10)
3. (TCO 9 & 10) There is a logic error in the following pseudocode. What statement(s) would you need to add to correct the logic? Be sure to explain why you are adding the statements.
Set
DOWHILE num <=>
Set + num
ENDO
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 7 have a 5% sales tax. The 8-24 codes have a sales tax of 7%. Codes above 24 have a sales tax of 9%. The code is entered by the user.
Begin
Declare Real salesTax
Declare ____ countyCode
_____ “Enter the county code: “
Input _____________
If _______ <= 7="">
Set
Else
If ______ AND ______ then
______________
Else
Set
EndIf
____________
Display “the sales tax is: “ + _______________
End (Points : 10)
5. (TCO 5 & 10) Complete the pseudocode by rewriting the algorithm. The design is to display a 60 second countdown.
Begin
Declare _______ count
Set
REPEAT
Display “countdown: “ + _______
Set - 1
UNTIL ___________
Display “LIFT OFF!”
End (Points : 10)
6. (TCO 4, 5 & 10) Complete the pseudocode by rewriting the algorithm. The colors red, blue, and yellow are known as primary colors because they cannot be made by mixing other colors. When you mix two primary colors, you get a secondary color. Mixing yellow and blue gets you green. Mixing red and blue gets you purple. The algorithm allows the user to enter two primary colors and then displays the resulting secondary color. The colors entered by the user will be validated to ensure they entered a primary color.
Begin
Declare String color1
Declare String color2
Declare String control1
Declare String control2
______ “Enter first primary color: “
Input _______
Prompt “Enter the second primary color: “
Input _________
Set control1 = “n”
DOWHILE control1 = “n”
If (color1 <> “yellow”) ______ (color1 <> “red”) _______ (color1 <> “blue”) then
Prompt “first primary color is invalid”
Input _________
Else
Set control1 = “y”
ENDO
Set control2 = “n”
DOWHILE control2 = “n”
If (color2 <> “yellow”) ______ (color2 <> “red”) _______ (color2 <> “blue”) then
Prompt “second primary color is invalid”
Input color2
Else
Set control2 = “y”
ENDO
If (color1 = “red”) AND (__________) then
Display “secondary color is: purple”
EndIf
If (color1 = “yellow”) AND (_________) then
Display “secondary color is: green”
EndIf
End (Points : 10)
7. (TCO 1, 2, 3, & 4) Describe the difference between a flowchart and pseudocode and explain whether one is more important to develop than the other. (Points : 10)
8. (TCO 1, 2, 3, 4, & 5) Compare and contrast sequence control structures and selection control structures. (Points : 10)

CIS115 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) ^ 3.
10. (TCO 2) Review the partial pseudocode below. What is the correct math expression to complete the algorithm and total sales for both regions?
Prompt “Enter total sales for region 1: “
Input region1
Prompt “Enter total sales for region 2: “
Input region2
Set _____
Display “total sales: “ + total (Points : 4)
11. (TCO 3 & 4) Review the pseudocode below. What will be displayed when this algorithm executes?
Set
If ((x > = 10) AND (x < 20))="">
Display “the IF path executes”
Else
Display “the ELSE path executes”
EndIf (Points : 4)
12. (TCO 3 & 4) What value gets displayed for the variable X?
Set
Set
Set
If (B > 15) AND (() OR (C <= 15))="">
Set
Else
Set
EndIf
Display X (Points : 4)
13. (TCO 3 & 4) In the following pseudocode, what raise will an employee in Department 6 receive?
If department < 2="">
Set
Else
If department < 6="">
Set
Else
Set
EndIf
EndIf (Points : 4)
14. (TCO 3 & 4) Which of the selection structures determine whether the user enters a number outside a range of 5 and 15? (Points : 4)
15. (TCO 3 & 4) What value gets displayed for the variable Z?
Set
Set
Set
If ((balance <> 800) OR (stateCode <> 6) OR (creditCode <> 7) then
Set
Else
Set
EndIf
Display Z (Points : 4)
1. (TCO 5) The statements executed within a loop are known collectively as the _____. (Points : 4)
2. (TCO 5) Which of the following statements is false? (Points : 4)
3. (TCO 5) A DO loop is considered what type of loop? (Points : 4)
4. (TCO 5) What happens when the loop control variable is not changed? (Points : 4)
5. (TCO 5) How many times will the following loop be executed?
Set
DOWHILE num <=>
Display num
Set + 1
ENDO (Points : 4)
6. (TCO 7) What is another name for an array’s index? (Points : 4)
7. (TCO 7) Suppose you have an array named number,
and two of its elements are number(1) and number(4). You know that _____. (Points : 4)
8. (TCO 7) Which one of the following correctly declares a zero-based array of four integers? (Points : 4)
9. (TCO 7) When processing the elements of an array, what control structure is used to move through each element within the array? (Points : 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 1200. What value will be stored in the array elementsales(1)? (Points : 4)
11. (TCO 6) A file contains _____. (Points : 4)
12. (TCO 6) What is automatically placed at the bottom of a file when the file is closed? (Points : 4)
13. (TCO 8) Menu-driven programs need to give the user the option to _____. (Points : 4)
14. (TCO 9) What type of error occurs when a program will not execute because the rules of the language have been violated? (Points : 4)
15. (TCO 2) The first module is usually considered to be called the _____ module. (Points : 4)
1. (TCO 10) A retail store is having a customer appreciation sale. Depending on the total dollars purchased, the customer could receive a discount on his or her total purchases. You are to develop pseudocode that will obtain the total dollars purchased from the user, determine the discount percentage, and display the total amount due. When the purchases are more than $100, the discount is 10%. When the purchases are $100 or less, the discount is 5%. (Points : 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. The user will enter three different purchase amounts. You need to display the average to your client. Complete the pseudocode to design your logic. (Points : 10)
3. (TCO 9 & 10) There is a logic error in the following pseudocode. The loop needs to execute four times. What statement(s) would you need to add or change to correct the logic? Be 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 _____ <= 10="">
Set
Else
If _____ AND _____ then
Set
Else
_____
EndIf
_____
Display “the sales tax is: “ + _____
End (Points : 10)
5. (TCO 5 & 10) Complete the pseudocode by rewriting the algorithm. The design is to display a 60-second countdown.
Begin
Declare _____ count
Set
REPEAT
Display “countdown: “ + _____
Set - 1
UNTIL _____
EndDo
Display “LIFT OFF!”
End (Points : 10)
6. (TCO 4, 5 & 10) Complete the pseudocode by rewriting the algorithm. The colors red, blue, and yellow are known as primary colors because they cannot be made by mixing other colors. When you mix two primary colors, you get a secondary color. Mixing yellow and blue gets you green. Mixing red and blue gets you purple. The algorithm allows the user to enter two primary colors and then displays the resulting secondary color. The colors entered by the user will be validated to ensure they entered a primary color.
Begin
Declare String color1
Declare String color2
Declare String control1
Declare String control2
_____ “Enter first primary color: “
Input _____
Prompt “Enter the second primary color: “
Input _____
Set control1 = “n”
DOWHILE control1 = “n”
If (color1 <> “yellow”) _____ (color1 <> “red”) _____ (color1 <> “blue”) then
Prompt “first primary color is invalid”
Input _____
Else
Set control1 = “y”
ENDO
Set control2 = “n”
DOWHILE control2 = “n”
If (color2 <> “yellow”) _____ (color2 <> “red”) _____ (color2 <> “blue”) then
Prompt “second primary color is invalid”
Input color2
Else
Set control2 = “y”
ENDO
If (color1 = “red”) AND (_____) then
Display “secondary color is: purple”
EndIf
If (color1 = “yellow”) AND (_____) then
Display “secondary color is: green”
EndIf
End (Points : 10)
7. (TCO 1, 2, 3, & 4) Describe the difference between a flowchart and pseudocode and explain whether one is more important to develop than the other. (Points : 10)
8. (TCO 1, 2, 3, 4, & 5) Describe two of the three control structures and how relational and logical operators are used. (Points : 10)