UNIVERSIDAD DEL TURABO Ing. José Domingo Pérez School of Engineering Gurabo, P.R. ENGI 122 Introduction to Computer Programming HOMEWORK #3 – Selection Structures Instructor: Wilma Pabón Submit Date: Tuesday, April 20, 2010 at class period. Homework submitted after due date will have a penalty. *** All Excel/Macro file should be send to me by email [email protected]to get full/partial punctuation.Problem 1: A t-shirt shop sells shirts that retail for $16. Quantity discounts are given as follow: Number of Shirts Discount 10-20 10% 21-40 15% 41-60 20% 61or more 25% Write a VBA program that prompts the user for the number of shirts required and then computes corresponding discount, and the total price. Assume a sale tax of 4.5 %. Number of Shirts Price without discount Discount Sale Tax Total Price 4 14 22 48 75 The program output should be display the number of shirts, price without discount, discount in dollars, sale tax charge, and total price. Make sure to include the following as part of your solution: (a) Analysis of the problem (what program must do?, inputs, process, and outputs) (b) Develop a solution (flowchart or pseudocode) (c) Code your solution (VBA code) (d) Test your solution by hand

Problem #2: Based on an automobile’s model year and weight the state of New Jersey determines the car’s weight class and registration fee using the following schedule:Model Year Weight Weight Class Registration Fee ($) 1970 or earlier Less than 2700 lbs 1 16.50 2700 to 3800 lbs 2 25.50 More than 3800 lbs 3 46.50 1971 to 1979 Less than 2700 lbs 4 27.00 2700 to 3800 lbs 5 30.50 More than 3800 lbs 6 52.50 1980 or later Less than 3500 lbs 7 19.50 3500 or more lbs 8 52.50 Using this information, write a VBA program that accepts the year and weight of an automobile and determines and displays the weight class and registration fee for the car. Run your program several times and complete the following table. Model Year Weight Weight Class Registration Fee ($) 1968 3200 1993 3650 1976 2400 1987 3200 *** For Problem #2, it only need to submit a flowchart or pseudocode, VBA code, and complete the table above.

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors and customizable flashcards—available anywhere, anytime.