Search results for 'shipping'
-
CIS 170 Week 2 iLab 2 of 7 Decisions
$15.00CIS 170 Week 2 iLab 2 of 7 Decisions
Scenario/Summary
You will code, build, execute, debug, and test two programs using decision structures. The first program will calculate the shipping charge based on a given purchase amount. The second program translates a given TV channel to its call sign.
Part A: Calculate Shipping Charge
Requirements
Your mission: Write a program that gets the amount of a purchase from the user and then calculates the shipping charge, based on the following table:
$0.00 - $250.00: $5.00
$250.01 - $500.00: $8.00
$500.01 - $1,000.00: $10.00
$1,000.01 - $5,000.00: $15.00
over $5,000.00: $20.00
Sample output from program:
Enter a purchase amount to find out your shipping charges.
Please enter the amount of your purchase: 234.65
The shipping charge on a purchase of $234.65 is $5.00.
Press any key to continue . . .
Tips
Best practice: Put yourself in the place of the program. What questions would you ask a customer in order to get the best input? How would you determine the correct shipping charges if you had to make the decisions yourself? Write out the questions you would ask yourself on paper as pseudocode and/or in Visual Studio as C# comments, and then implement them one by one, testing as you go. Remember to not write too much at one time. Always add and test functionality incrementally!
You can use the pseudocode below as a guide:
Prompt the user for the sale amount
Is sale amount greater than $5,000.00?
If so, shipping is $20.00
If not, is sale amount greater than $1,000.00?
If so, shipping is $15.00
If not, is sale amount greater than $500.00?
If so, shipping is $10.00
If not, is sale amount greater than $250.00?
If so, shipping is $8.00
If not, is sale amount greater than $0.00
shipping is $5.00
If not
shipping is $0.00
If shipping is $0.00
Display "Error incorrect input"
If not
Display sale amount and shipping charge
Learn More
Part B: TV Channel to Call Sign
Requirements
Your mission: Write a program that translates a TV channel (1 through 10) in your area to its respective call sign. For example, in the New York metropolitan area, channel 2 translates to WCBS. If a channel is unused in your area, tell the user that this is the case.
Sample output from program:
Translate TV Channel Number to Call Sign
Enter channel number: 1
Channel 1 is undesignated in your area
Enter channel number: 2
Call sign for channel 2 is WCBS
Enter channel number: 6
Call sign for channel 6 is WRNNDT
Tips
Best practice: Put yourself in the place of the program. What steps would you personally need to perform in order to process a channel translation yourself? Write out those steps on paper as pseudocode and/or in Visual Studio as C# comments, and then implement them one by one, testing as you go. Remember to not write too much at one time. Always add and test functionality incrementally!
Pseudocode: Although there are several valid ways to write the program, the following is an outline of one way to design the overall logic.
Declare variables for channel and call sign
Get channel number from user
Use appropriate decision structure to translate number to call sign
If number is valid in area
Print out translation
If not
Tell user this is the case -
IT358 Unit 7 Synonyms Index and Sequence
$20.00IT358 Unit 7 Synonyms Index and Sequence
Learn More
Outcomes addressed in this activity:
Describe how the schema objects work
Describe how sequences and indexes are created, modified, and removed within Oracle
Describe when to use an Index
Utilize Synonyms
Project requirements:
In this project, you will create a view, synonym, and index:
1. Answer the Review Questions #1–5 from Chapter 6.
2. Complete Hands-on Assignments #1-10.
Oracle 11G SQL Chapter 6 Hands-On assignment Solution
1. Create a sequence to use for populating the Customer# column of the CUSTOMERS table. When setting the start and the increment values, keep in mind that data already exists in this table. The options should be set to not cycle the values, not cache any values, and no minimum or maximum values should be declared.
2. Add a new customer row using the sequence created in Question 1. The only data currently available for the customer is as follows: last name = Shoulders, first name = Frank, and zip = 23567.
3. Create a sequence that will generate integers starting with the value 5. Each value should be three less than the previous value generated.The lowest possible value should be 0, and the sequence should not be allowed to cycle. Name the sequence MY_FIRST_SEQ.
4. Issue a SELECT statement that will display NEXTVAL for MY_FIRST_SEQ three times. Because the value is not being placed in a table, use the DUAL table in the FROM clause of the SELECT statement. What causes the error on the last SELECT?
5. Change the setting of MY_FIRST_SEQ so the minimum value that can be generated is –1000.
6. Create a private synonym that will allow you to reference the MY_FIRST_SEQ object as NUMGEN.
7. Use a SELECT statement to view the CURRVAL of NUMGEN. Delete the NUMGEN synonym and MY_FIRST_SEQ.
8. Create a Bitmap index on the CUSTOMERS table to speed up queries that search for customers based on their state of residence. Verify that the index exists, and then delete the index.
9. Create a B-tree index on the customer’s Last Name column. Verify that the index exists by querying the data dictionary. Remove the index from the database.
10. Many queries search by the number of days to ship (number of days between the order and shipping dates). Create an appropriate index that might improve the performance of these queries.