order size >=100 -> price is $1.50 UnitPrice As Double OrderSize As Double TotalCost As Double erSize InputBox ("Enter order size") OrderSize < 100 Then tPrice = 2 tPrice 1.5 If alCost = Box "The total UnitPrice * OrderSize cost is & Format (TotalCost

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Sub PlaceOrder1()
'If order size < 100 -> price is $2
'If order size >=100 -> price is $1.50
Dim UnitPrice As Double
Dim OrderSize As Double
Dim TotalCost As Double
OrderSize =
If OrderSize < 100 Then
InputBox ("Enter order size")
UnitPrice
= 2
Else
UnitPrice
1.5
End If
TotalCost = UnitPrice * OrderSize
MsgBox "The total cost is " & Format (TotalCost, "currency")
I
End Sub
Transcribed Image Text:Sub PlaceOrder1() 'If order size < 100 -> price is $2 'If order size >=100 -> price is $1.50 Dim UnitPrice As Double Dim OrderSize As Double Dim TotalCost As Double OrderSize = If OrderSize < 100 Then InputBox ("Enter order size") UnitPrice = 2 Else UnitPrice 1.5 End If TotalCost = UnitPrice * OrderSize MsgBox "The total cost is " & Format (TotalCost, "currency") I End Sub
This is strictly individual work, no teamwork allowed. Modify the order-placing program from today's class
to implement the unit price schedule shown in Table 1 below (the VBA code to be modified is on pages
22-23 from the DSS notes on Husky CT). Submit your answer via Husky CT in a module inside a Macro-
Enabled Excel file.
Order Size
Price
To less
From
per
than
Unit
50
$2.00
50
100
$1.50
100
500
$1.00
500
1000
$0.50
1000
2000
$0.25
2000
Infinity
$0.20
Table 1.
Transcribed Image Text:This is strictly individual work, no teamwork allowed. Modify the order-placing program from today's class to implement the unit price schedule shown in Table 1 below (the VBA code to be modified is on pages 22-23 from the DSS notes on Husky CT). Submit your answer via Husky CT in a module inside a Macro- Enabled Excel file. Order Size Price To less From per than Unit 50 $2.00 50 100 $1.50 100 500 $1.00 500 1000 $0.50 1000 2000 $0.25 2000 Infinity $0.20 Table 1.
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY