159k views
1 vote
Spring 2023 - Intro to Business Programming (CISM-2030-A)

Write a program that asks whether any members of your party are vegetarian, vegan, or gluten-free, to which then displays only the restaurants to which you may take the group. It receives customer information from customers and recommends restaurants that fit their tastes. Recommendations are made in a way that avoids things that do not fit your taste.
First, the restaurant's dietary information is as follows.
- Joe's Gourmet Burgers-Vegetarian: No, Vegan: No, Gluten-Free: No
- Main Street Pizza Company-Vegetarian: Yes, Vegan: No, Gluten-Free: Yes
- Corner Café-Vegetarian: Yes, Vegan: Yes, Gluten-Free: Yes
- Mama's Fine Italian-Vegetarian: Yes, Vegan: No, Gluten-Free: No
- The Chef's Kitchen-Vegetarian: Yes, Vegan: Yes, Gluten-Free: Yes
In addition, if the customer is asked the following questions and answered as follows, it is recommended as shown below.
Is anyone in your party a vegetarian? yes
Is anyone in your party a vegan? no
Is anyone in your party gluten-free? yes
Here are your restaurant choices:
Main Street Pizza Company
Comer Cafe
Here is another example of the program's output:
Is anyone in your party a vegetarian? yes
Is anyone in your party a vegan? yes
Is anyone in your party gluten-free? yes
Here are your restaurant choices:
Comer Cafe
The Chef's Kitche

1 Answer

4 votes

Final answer:

An Intro to Business Programming program requires development to recommend restaurants based on customer dietary preferences, such as vegetarian, vegan, and gluten-free options. The program should query the customer and match their requirements against a preset list of restaurants, each labeled with available dietary accommodations.

Step-by-step explanation:

Restaurant Recommendation Program

The scenario presented is about creating a program for an Intro to Business Programming course that assists customers in selecting restaurants based on dietary preferences. For example, a customer requiring options for a party with dietary restrictions such as vegetarian, vegan, or gluten-free members will receive recommendations accordingly. To solve this, the program should ask users about dietary requirements and cross-reference these with restaurant data to provide suitable suggestions. The following are the restaurant options available, labeled with their respective dietary accommodations:

  • Joe's Gourmet Burgers - Vegetarian: No, Vegan: No, Gluten-Free: No
  • Main Street Pizza Company - Vegetarian: Yes, Vegan: No, Gluten-Free: Yes
  • Corner Café - Vegetarian: Yes, Vegan: Yes, Gluten-Free: Yes
  • Mama's Fine Italian - Vegetarian: Yes, Vegan: No, Gluten-Free: No
  • The Chef's Kitchen - Vegetarian: Yes, Vegan: Yes, Gluten-Free: Yes

Based on the customer's answers:

Vegan: no

Vegetarian: yes

Gluten-Free: yes

Recommended restaurants are:

  • Main Street Pizza Company
  • Corner Café

For customers that are both vegetarian, vegan, and gluten-free, the program will recommend:

  • Corner Café
  • The Chef's Kitchen

User Dasari Kamali
by
8.1k points