CS170 – Computer Applications for Business Assignment 5

Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due

CS170 – Computer Applications for Business

Assignment 5

Due Date:

Before 11:59 p.m. on Friday, Oct 11, 2024

Accept Until:

Before 11:59 p.m. on Friday, Oct 18, 2024

Evaluation:

20 points

Submit to Canvas:

Assignment5_Pseudocode.txt file (in text format)

Assignment5_Flowchart file (in image format such as jpg, bmp, png)

Note: You may also include both in a single Word file (.docx format)

Related Materials:

Pseudocode Reference Guide.pdf

draw.io

Need help?

TA office hours and Lab Support Schedule posted in Canvas

YOU ARE ON YOUR HONOR TO COMPLETE THIS ASSIGNMENT WITHOUT ASSISTANCE. You may use your text and resources available to you through Canvas. You MAY NOT ask any human for assistance, give assistance to anyone, or use any online tutoring service.

To earn credit for this assignment:

1.    You will solve the problem detailed below by creating a flowchart with corresponding pseudocode.

2.   The flowchart should be created using a software tool such as draw.io  or Flowgorithm - and  then exported into an image file.

3.    The pseudocode should be typed in a text file using a simple text editor like Notepad.

4.    Hand drawings or pictures of hand drawings cannot be used as part of the submission.

5.    In Canvas, use the Browse button to attach the flowchart file and the file with the

pseudocode  (you will use the Browse button two times to attach the files one by one).

6.    Finally, Submit the two (or one) attached files.

For your assignment to be graded, please include on the document the following statement: “ On my honor, Ihave neither received nor given any unauthorized assistance on this assignment.”

Overview:

This assignment is designed to gain proficiency in the creation of flowcharts and pseudocode that may be used to create JavaScript programs later. The assignment focuses on Decision Statements (IFs)

PROBLEM DESCRIPTION

A travel agency offers a variety of different packages for visiting several regions in Spain. Each package includes accommodations for a certain number of nights at a hotel within the region being visited. To increase the amount of customers using this agency to travel, the agency has started to offer premium packages that come with extra benefits.

● Length of trip:

o Hotel accommodations cost $200 per day

o A trip length of 7 (or more) days will receive a 10% discount on hotel costs

● Transportation and tour guide services:

o Rent transportation vehicle $150 per day

o Private tour guide $200 per day

● At the end of the purchase, two levels of premium packages will be offered, Silver or Gold. Customers can choose either one (or none) of the two.

o Silver premium packages cost $100 and provide a 10% discount on transportation and tour guide services

o Gold premium packages cost $200 and provide a 20% discount on all purchases (including the package cost)

Inputs:

● NumDays: Int

● TransportationVehicle: Yes or No

● TourGuide: Yes or No

● PremiumPackage: Yes or No

● PremiumType: Silver or Gold

Outputs:

● Total price (pre-tax).

● Discounts

● Sales Tax amount to be added to the cost (7% rounded up to the nearest cent, after discount).

● Final Cost of the trip (including the tax).

SAMPLE TRACES THROUGH THE CORRECT ALGORITHM

Sample 1: INPUT:

NumDays: 4

TransportationVehicle: Yes

TourGuide: Yes

PremiumPackage: No

Sample 2: INPUT:

NumDays: 3

TransportationVehicle: Yes

TourGuide: No

PremiumPackage: Yes

PremiumType: Silver

Sample 3 INPUT:

NumDays: 7

TransportationVehicle: Yes

TourGuide: Yes

PremiumPackage: Yes

PremiumType: Gold

OUTPUT:

Total Price = $2200.00 Discount = $0.00

Sales Tax = $154.00 Final Cost = $2354.00

OUTPUT:

Total Price = $1150.00 Discount = $45.00

Sales Tax = $77.35

Final Cost = $1182.35

OUTPUT:

Total Price = $3910.00 Discount = $922.00

Sales Tax = $209.16 Final Cost = $3197.16

References:

● Recitation session

● Lectures

● Chapter 10 of the textbook

● Pseudocode Reference Guide


发表评论

电子邮件地址不会被公开。 必填项已用*标注