subject

SECTION A

Using Scalar Variables

Create a PL/SQL block containing the following variables:

NAME DATA TYPE OPTION INITIAL VALUE

lv_test_date DATE December 10, 2012

lv_test_num NUMBER (3) CONSTANT 10

lv_test_txt VARCHAR2 (10)

Assign your last name as the value of the text variable in the executable section of the block. Include statements in the block to display each variable’s value onscreen.

CREATING A FLOWCHART

The brewbean’s application needs a block that determines whether a customer is rated high, mid, or low based on his or her total purchases. The block needs to determine the rating and then display the results on screen. The code rates the customer high if total purchase are greater than $200, mid if greater than $100, and low if $100 or lower. Develop a flowchart to outline the conditional processing steps needed for this block

USING IF STATEMENTS

Create a block using an IF statement to perform the actions described in (2) above. Use a scalar variable for the total purchase amount, and initialize this variable to different values to test your block.

USING CASE STATEMENTS

Create a block using a CASE statement to perform the actions described in (3) above. Use a scalar variable for the total purchase amount, and initialize this variable to different values to test your block.

USING A BOOLEAN VARIABLE

Brewbean’s needs program code to indicate whether an amount is still due on an account when a payment is received. Create a PL/SQL block using a Boolean variable to indicate whether an amount is still due. Declare and initialize two variables to provide input for the account balance and payment amount received. A TRUE Boolean value should indicate an amount is still owed, and FALSE value should indicate the account is paid in full. Use output statements to confirm that the Boolean variable is working correctly.

USING LOOPING STATEMENTS

Create a block using a loop that determines the number of items that can be purchased based on the item prices and the total available to spend. Include one initialized variable to represent the price and another to represent the total available to spend. (You could solve it with division, but you need to practice using loop structures.). The block should include statements to display the total number of items that can be purchased and the total amount spent.

CREATING A FLOWCHART

Brewbean’s determine shipping costs based on the number of items ordered and club membership status. The applicable rates are shown in the following chart. Develop a flowchart to outline the condition-processing steps needed to handle this calculation.

QUANTITY OF ITEMS NONMEMBER SHIPPING COST MEMBER SHIPPING COST

Up to 3 $5.00 $3.00

4-6 $7.50 $5.00

7-10 $10.00 $7.00

More than 10 $12.00 $9.00

USING IF STATEMENTS

Create a block to accomplish the task outlined in (7) above. Include a variable containing a Y or N to indicate membership status and a variable to represent the number of items purchased. Test with a variety of values.

(75% of mark)

SECTION B

Create a single row subqueries using the following operators =, <, >, >=, <=, <>, using a WHERE clause, HAVING clause.

Create a multiple row subqueries using IN, ANY, ALL, EXISTS operator using a WHERE clause, HAVING clause.

Create a nested subqueries using two or more tables in the database.

(25% of mark)

Upload your file to the drop box.

This assignment is due on Wed. Oct 18th 2017 at 10 pm.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
Business professionals of america, and future business leaders of america – phi beta lambda are both open to business students at which levels? check all that apply. elementary school middle school high school college
Answers: 1
question
Computers and Technology, 22.06.2019 13:30
Jane’s team is using the v-shaped model for their project. during the high-level design phase of the project, testers perform integration testing. what is the purpose of an integration test plan in the v-model of development? a. checks if the team has gathered all the requirements b. checks how the product interacts with external systems c. checks the flow of data in internal modules d. checks how the product works from the client side
Answers: 1
question
Computers and Technology, 23.06.2019 04:20
4. a1. vince owns a television repair shop that is insured undera commercial package policy. the policy includes thebuilding and personal property coverage form and thecauses-of-loss broad form. the declarations page indicatesthat coverage applies to both the building and the namedinsured's business property. explain whether or not thefollowing losses would be covered under his policy.a. a fire occurs on the premises, and the building isbadly damaged.b. a burglar steals some money and securities from anunlocked safe.c. a business computer is damaged by vandals whobreak into the shop after business hours.d. a tornado touches down near the store. several tel-evision sets of customers in the shop for repair aredamaged in the storm.til
Answers: 2
question
Computers and Technology, 23.06.2019 14:30
The basic work area of the computer is it screen that you when you first fire up your computer
Answers: 1
You know the right answer?
SECTION A

Using Scalar Variables

Create a PL/SQL block containing the foll...
Questions
question
Biology, 15.04.2021 23:00
question
Mathematics, 15.04.2021 23:00
question
Mathematics, 15.04.2021 23:00
question
Chemistry, 15.04.2021 23:00
question
Mathematics, 15.04.2021 23:00
Questions on the website: 13722363