need help please to write a program in Assembly programming language for a grocery store to calculate the total charge for customers following this algorithm:   1. In the main: a) ask customer for the number of items that they are purchasing b) check to see it is less than or equal to 20 items c) pass than number to FillPriceArray subroutine and call FillPriceArray subroutine. 2. FillPriceArray subroutine: a) fill the array and accumulate the prices sub total b) return the sub total to main. 3. In the main: a) ask customer for the number of coupons (it should be the same as the number of items) b) pass the coupon number to FillCouponArray subroutine and call FillCouponArray subroutine to fill the CouponArray. 4. FillCouponArray subroutine: a) fills the array and accumulate the discount total *get the coupon amount: The coupon should be less than item price and coupon should not be more than $10 if the coupon is more than item price or exceed $10 then you place 0 in the CouponArray for that coupon. b) return coupon sum to main 5. In the main: a) calculate the total charge by subtracting the total price from total discount coupons b) out put the total charge with a thank you massage on the screen.

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter4: The Selection Structure
Section: Chapter Questions
Problem 2MQ6: Jake’s Car Rental charges each customer a daily rental fee of $55. However, there is an additional...
icon
Related questions
Question

I need help please to write a program in Assembly programming language for a grocery store to calculate the total charge for customers following this
algorithm:

 

1. In the main:
a) ask customer for the number of items that they are purchasing
b) check to see it is less than or equal to 20 items
c) pass than number to FillPriceArray subroutine and call FillPriceArray subroutine.
2. FillPriceArray subroutine:
a) fill the array and accumulate the prices sub total
b) return the sub total to main.
3. In the main:
a) ask customer for the number of coupons (it should be the same as the number of
items)
b) pass the coupon number to FillCouponArray subroutine and call FillCouponArray
subroutine to fill the CouponArray.
4. FillCouponArray subroutine:
a) fills the array and accumulate the discount total
*get the coupon amount:
The coupon should be less than item price and coupon should not be more than $10
if the coupon is more than item price or exceed $10 then you place 0 in the
CouponArray for that coupon.
b) return coupon sum to main
5. In the main:
a) calculate the total charge by subtracting the total price from total discount coupons
b) out put the total charge with a thank you massage on the screen.

Please enter the number of item you are purchasing:
21
Sorry, too many items to purchase!!
Please enter number of items you are purchasing:
3
Please enter the price of item 1:
Please enter the price of item 2:
Please enter the price of item 3:
10
10
20
Please enter the number of coupons that you want to use.
4
Too many Coupons!! Please enter the number of coupons that you want to use.
3
Please enter the amount of coupon 1: 15
This coupon is not acceptable
Please enter the amount of coupon 2: 5
Please enter the amount of coupon 3: 5
Your total charge is:
$30
Thank you for shopping with us.
Transcribed Image Text:Please enter the number of item you are purchasing: 21 Sorry, too many items to purchase!! Please enter number of items you are purchasing: 3 Please enter the price of item 1: Please enter the price of item 2: Please enter the price of item 3: 10 10 20 Please enter the number of coupons that you want to use. 4 Too many Coupons!! Please enter the number of coupons that you want to use. 3 Please enter the amount of coupon 1: 15 This coupon is not acceptable Please enter the amount of coupon 2: 5 Please enter the amount of coupon 3: 5 Your total charge is: $30 Thank you for shopping with us.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps

Blurred answer
Knowledge Booster
Concept of memory addresses in pointers
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT