Page 1

Full file at http://testbank360.eu/solution-manual-programming-with-microsoft-visual-basic-2008-4th-editiondiane-zak

Chapter 2 – Lesson A Lesson A Review Questions 1. 2. 3. 4.

5.

c a c 2 4 1 3 5 3 4 6 2 1

upper-left corner book title capitalization Identifying labels should be entered using book title capitalization. Identify the objects to which you will assign the tasks. Draw a sketch of the user interface. Identify the tasks the application needs to perform. Identify the events required to trigger an object into performing its assigned tasks. Test and debug the application Build the user interface Code the application Assemble the documentation Plan the application Meet with the client

Lesson A Exercises 1.

TOE charts and sketch may vary.

Task Get the following from the user: name sales commission rate Calculate the commission Display the following: name sales commission rate commission End the application Clear the screen

Object

Event

txtName txtSales txtRate btnCalc

None None None Click

txtName txtSales txtRate btnCalc, lblCommission btnExit btnClear

None None None Click, None Click Click

Task 1. Calculate the commission 2. Display the commission in the lblCommission control Clear the screen End the application Display the commission (from btnCalc) Get and display the name, sales, and rate

Object btnCalc

Event Click

btnClear btnExit lblCommission

Click Click None

txtName, txtSales, txtRate

None

Programming with VB 2008 4E

0-3247-8276-4


Full file at http://testbank360.eu/solution-manual-programming-with-microsoft-visual-basic-2008-4th-editiondiane-zak Sample of a vertical arrangement:

Sample of a horizontal arrangement:

2.

TOE charts and sketch may vary.

Task Get the following from the user: current year’s sales for each region

Object

Event

txtNorthSales, txtSouthSales, txtEastSales, txtWestSales

None

projected increase % for each region

txtNorthIncrease, txtSouthIncrease, txtEastIncrease, txtWestIncrease btnCalc

Calculate the projected sales for each region Display the following: current year’s sales for each region

Click

txtNorthSales, txtSouthSales, txtEastSales, txtWestSales

None

projected increase % for each region

txtNorthIncrease, txtSouthIncrease, txtEastIncrease, txtWestIncrease

None

projected sales for each region

btnCalc, lblNorth, lblSouth, lblEast, lblWest btnExit btnClear

Click None Click Click

End the application Clear the screen

Programming with VB 2008 4E

0-3247-8276-4


Full file at http://testbank360.eu/solution-manual-programming-with-microsoft-visual-basic-2008-4th-editiondiane-zak Task 1. Calculate the projected sales for each region 2. Display the projected sales in the lblNorth, lblSouth, lblEast, and lblWest controls Clear the screen End the application Display the projected sales (from btnCalc) Get and display the projected increase % for each region Get and display the current year’s sales for each region

Object btnCalc

Event Click

btnClear btnExit lblNorth, lblSouth, lblEast, lblWest txtNorthIncrease, txtSouthIncrease, txtEastIncrease, txtWestIncrease txtNorthSales, txtSouthSales, txtEastSales, txtWestSales

Click Click None None None

Sample of a vertical arrangement:

Sample of a horizontal arrangement:

3.

See the VB2008\Chap02\laTime Solution files on the Solutions Disk. Answers may vary.

Programming with VB 2008 4E

0-3247-8276-4


Full file at http://testbank360.eu/solution-manual-programming-with-microsoft-visual-basic-2008-4th-editiondiane-zak

Chapter 2 – Lesson B Lesson B Review Questions 1. 2. 3. 4. 5.

b TabIndex d x d Text a &Display To give keyboard access to a text box, assign an access key to its identifying label control. Then set the label control’s TabIndex property to a value that is one number less than the text box’s TabIndex value.

Lesson B Exercises 1. 2. 3.

See the VB2008\Chap02\lbPaper Solution files on the Solutions Disk. See the VB2008\Chap02\lbRM Sales Solution files on the Solutions Disk. See the VB2008\Chap02\lbTime Solution files on the Solutions Disk.

Chapter 2 – Lesson C Lesson C Review Questions 1. 2. 3. 4. 5.

b lblTotal.Text = Val(txtSales1.Text + txtSales2.Text) c Val d rectangle 2 23

Lesson C Exercises 1. 2. 3. 4.

See the VB2008\Chap02\lcPaper Solution files on the Solutions Disk. Answer using valid test data: $200.00. See the VB2008\Chap02\lcRM Sales Solution files on the Solutions Disk. Answers using valid test data: North projected sales are 27,500.00; South projected sales are 10,500.00; East projected sales are 10,400.00; West projected sales are 16,650.00 See the VB2008\Chap02\lcTime Solution files on the Solutions Disk. See the VB2008\Chap02\lcJohnLee Solution files on the Solutions Disk. (The interface might not contain a Clear button.) Answer using first set of test data: 4500 ending balance Answer using second set of test data: 0 ending balance

Task 1. Calculate ending balance 2. Display ending balance in xEndLabel control Clear the screen End the application Display the ending balance (from btnCalc) Get and display the beginning balance, monthly earnings, monthly expenses

Programming with VB 2008 4E

Object btnCalc

Event Click

btnClear btnExit lblEnd txtBegin, txtEarn, txtExp

Click Click None None

0-3247-8276-4


Full file at http://testbank360.eu/solution-manual-programming-with-microsoft-visual-basic-2008-4th-editiondiane-zak Pseudocode: btnCalc Click event procedure 1. calculate ending balance = beginning balance + monthly earnings – monthly expenses 2. display ending balance in lblEnd control btnClear Click event proceure 1. clear the Text property of the text boxes 2. clear the Text property of the lblEnd control 3. send the focus to the txtBegin control btnExit Click event procedure 1. end the application 5. 6.

See the VB2008\Chap02\lcModified Playtime Solution files on the Solutions Disk. See the VB2008\Chap02\lcLanaJones Solution files on the Solutions Disk. (The interface might not contain a Clear button.) Answer using first set of test data: 18 average Answer using second set of test data: 0 average

Task 1. Calculate average of three numbers 2. Display average in lblAvg Clear the screen End the application Display the average (from btnCalc) Get and display the first number, second number, and third number

Object btnCalc

Event Click

btnClear btnExit lblAvg txtNum1, txtNum2, txtNum3

Click Click None None

Pseudocode: btnCalc Click event procedure 1. calculate average = (first number + second number + third number) / 3 2. display average in lblAvg control btnClear Click event procedure 1. clear the Text property of the text boxes 2. clear the Text property of the lblAvg control 3. send the focus to the txtNum1 control btnExit Click event procedure 1. end the application 7.

See the VB2008\Chap02\lcBookworms Solution files on the Solutions Disk. (The interface might not contain a Clear button.) Answers using first set of test data: $4,000.00 paperback value, $3,750.00 hardcover value, 150 total versions, $7,750.00 total value Answers using second set of test data: $0.00 paperback value, $0.00 hardcover value, 0 total versions, $0.00 total value

Programming with VB 2008 4E

0-3247-8276-4


Full file at http://testbank360.eu/solution-manual-programming-with-microsoft-visual-basic-2008-4th-editiondiane-zak Task 1. Calculate the paperback value, hardcover value, total number of paperback and hardcover versions, and total value of the paperback and hardcover versions 2. Display the calculated amounts in the lblPaperValue, lblHardValue, lblTotalNum, and lblTotalValue controls Clear the screen End the application Display the paperback value, hardcover value, total number of paperbacks and hardcover versions, and total value of paperback and hardcover versions (from btnCalc) Get and display the title, number of paperback versions, number of hardcover versions, cost of paperback version, cost of hardcover version

Object btnCalc

Event Click

btnClear btnExit lblPaperValue, lblHardValue, lblTotalNum, lblTotalValue txtTitle, txtNumPaper, txtNumHard, txtCostPaper, txtCostHard

Click Click None

None

Pseudocode: btnCalc Click event procedure 1. calculate paperback value = number of paperback versions * paperback cost 2. calculate hardcover value = number of hardcover versions * hardcover cost 3. calculate total number of paperback and hardcover versions = number of paperback versions + number of hardcover versions 4. calculate total value of paperback and hardcover versions = paperback value + hardcover value 5. display paperback value, hardcover value, total number of paperback and hardcover versions, and total value of paperback and hardcover versions in lblPaperValue, lblHardValue, lblTotalNum, and lblTotalValue controls btnClear Click event procedure 1. clear the Text property of the text boxes 2. clear the Text property of the lblPaperValue, lblHardValue, lblTotalNum, and lblTotalValue controls 3. send the focus to the txtTitle control btnExit Click event procedure 1. end the application 8.

See the VB2008\Chap02\lcJackets Solution files on the Solutions Disk. (The interface might contain a Clear button.)

Task 1. Calculate the discount and the new price 2. Display the discount and the new price in the lblDiscount and lblNewPrice controls End the application Display the discount and new price (from btnCalc) Get and display the original price

Programming with VB 2008 4E

Object btnCalc

Event Click

btnExit lblDiscount, lblNewPrice txtOriginal

Click None

0-3247-8276-4

None


Full file at http://testbank360.eu/solution-manual-programming-with-microsoft-visual-basic-2008-4th-editiondiane-zak Pseudocode: btnCalc Click event procedure 1. calculate discount = original price * 25% 2. calculate new price = original price – discount 3. display the discount in the lblDiscount control 4. display the new price in the lblNewPrice control 5. send the focus to the txtOriginal control btnExit Click event procedure 1. end the application 9.

See the VB2008\Chap02\lcTypingSalon Solution files on the Solutions Disk. (The interface might not contain a Clear button.) Answers using first set of test data: $75.00 total due Answers using second set of test data: $0.00 total due

Task 1. Calculate the total due 2. Display the total due in the lblTotal control Clear the screen End the application Display the total due (from btnCalc) Get and display the name, number of typed envelopes, and number of typed pages

Object btnCalc

Event Click

btnClear btnExit lblTotal txtName, txtEnvelopes, txtPages

Click Click None None

Pseudocode: btnCalc Click event procedure 1. calculate total due = number of typed envelopes * .10 + number of typed pages * .25 2. display the total due in the lblTotal control btnClear Click event procedure 1. clear the Text property of the text boxes 2. clear the Text property of the lblTotal control 3. send the focus to the txtName control btnExit Click event procedure 1. end the application 10. See the VB2008\Chap02\lcSun Solution files on the Solutions Disk. (The interface might not contain a Clear button.) Task 1. Calculate gross pay, FWT, FICA, state tax, and net pay 2. Display the calculated amounts in the lblGross, lblFwt, lblFica, lblState, and lblNet controls Clear the screen End the application Display the gross pay, FWT, FICA, state tax, and net pay (from btnCalc) Get and display the name, hours worked, and rate of pay

Programming with VB 2008 4E

Object btnCalc

Event Click

btnClear btnExit lblGross, lblFwt, lblFica, lblState, lblNet txtName, txtHours, txtRate

Click Click None

0-3247-8276-4

None


Full file at http://testbank360.eu/solution-manual-programming-with-microsoft-visual-basic-2008-4th-editiondiane-zak Pseudocode: btnCalc Click event procedure 1. calculate the gross pay = hours worked * rate of pay 2. calculate the FWT = gross pay * 20% 3. calculate the FICA = gross pay * 8% 4. calculate the state tax = gross pay * 2.5% 5. calculate the net pay = gross pay – FWT – FICA – state tax 6. display the gross pay in the lblGross control 7. display the FWT in the lblFwt control 8. display the FICA in the lblFica control 9. display the state tax in the lblState control 10. display the net pay in the lblNet control btnClear Click event procedure 1. clear the Text property of the text boxes 2. clear the Text property of the lblGross, lblFwt, lblFica, lblState, and lblNet controls 3. send the focus to the txtName control btnExit Click event procedure 1. end the application 11. See the VB2008\Chap02\lcColfax Solution files on the Solutions Disk. (The interface might contain a Clear button.) Answer using test data: 7 full boxes and 3 remaining Task 1. Calculate the number of full boxes and the number remaining 2. Display the number of full boxes and the number remaining in the lblFull and lblRemain controls End the application Display the number of full boxes and the number remaining (from btnCalc) Get and display the inventory quantity and the number that can be packed in a box

Object btnCalc

Event Click

btnExit lblFull, lblRemain

Click None

txtQuantity, txtBox

None

Pseudocode: btnCalc Click event procedure 1. calculate the number of full boxes = inventory quantity \ number that can be packed in a box 2. calculate the number remaining = inventory quantity Mod number that can be packed in a box (Note: the student also could use the following equation: number remaining = inventory quantity – number of full boxes * number that can be packed in a box) 3. display the number of full boxes in the lblFull control 4. display the number remaining in the lblRemain control 5. send the focus to the txtQuantity control btnExit Click event procedure 1. end the application 12. See the VB2008\Chap02\lcDiscovery Playtime Solution files on the Solutions Disk. 13. See the VB2008\Chap02\lcDebug Solution files on the Solutions Disk. To debug the application, enter an apostrophe before the comment text below the procedure header in the btnCalc control’s Click event procedure. In the first assignment statement in the procedure, change lblGros to lblGross and also enter the ending parenthesis. In the second assignment statement, change the semicolon to a comma, and change Currency to “Currency”.

Programming with VB 2008 4E

0-3247-8276-4

Solution manual programming with microsoft visual basic 2008 4th edition diane zak  

solution manual programming with microsoft visual basic 2008 4th edition diane zak. Full file at http://testbank360.eu/solution-manual-...

Read more
Read more
Similar to
Popular now
Just for you