Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please answer using MATLAB CODING ONLY. Show all work and fill out the test table! D. (4 points) A movie theater sells 4 different priced

Please answer using MATLAB CODING ONLY. Show all work and fill out the test table! image text in transcribed
D. (4 points) A movie theater sells 4 different priced tickets: youth, adult, senior, student. Below is a matlab function called "tickets" that has 2 vectors as arguments: the first vector has the price of each type of ticket in dollars and the second vector has the of each type of ticket sold for a group of customers. The function returns the total ticket income and the total number of tickets sold. function income cnt tickets price numTickets income price numTickets; income sum (income) cnt sum (num Tickets) end [total Income totalCount] tickets ([3 10 6 5 1 3 1 21) total Income 49 total count. a. The theater has decided to add a special discount. Customers get a percentage off equal to the number of people in their party. Add code to the above function for that modification. b. The theater is also trying a different special discount. If there are more than 5 customers of a type (youth, adult, senior, student), one customer of that type gets in free. Create a test table for each of these seperate modifications, and create two matlab functions to solve the problem. Design will be done in lecture or lab. Rpected Result verified? e Data Test Case (manually calculate)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introductory Relational Database Design For Business With Microsoft Access

Authors: Jonathan Eckstein, Bonnie R. Schultz

1st Edition

1119329418, 978-1119329411

More Books

Students also viewed these Databases questions

Question

How does the concept of hegemony relate to culture?

Answered: 1 week ago