Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Develop a simulation program to evaluate the efficiency of a small fast food res

ID: 3598543 • Letter: D

Question

Develop a simulation program to evaluate the efficiency of a small fast food restaurant. Currently, it only has one machine for receiving payments. The company has discovered that the customer’s waiting queue was quite long during peak time. Therefore, the management is considering of increasing the number of machines for receiving payments. Since this company has a very tight budget, thus before investing lots of money in buying new machines and hiring new cashiers. The company wants to carry out a feasibility study to see if the investment is justified.

                To make the program easy to use by non-technical people, one of the required features is that this program must be menu driven. All the major options are available at the main menu screen. From this screen, users can set all the initial simulation parameters and choose to see the simulated results as well. **(Write this program in c++ language and complete all the requirements of this program given below).

Rules For Customer Satisfaction Levels Are:

Satisfied customers ---- waiting time is less than 3 minutes.

Normal customers ----- waiting time is greater than 3 minutes but less than 10 minutes

Unsatisfied customers ----- waiting time is over 10 minutes.

Program Requirements:

You must design your own stack and queue data structure.

You must demonstrate the use of inheritance.

You must use template class linked list.

This program must be menu-driven.

INPUT:

Amount of time needed for servicing one customer (in minutes).

Probability for any new customer arrives during any given minute.

(Assuming the maximum number of customers per minute is one.).

Total length of time needed for the simulation (in minutes).

OUTPUT:

Total number of customers serviced during the simulated time-period.

Average customer waiting time.

Total number of satisfied customers.

Total number of normal customers.

Total number of unsatisfied customers.

Explanation / Answer

package com.onetoMany;

import java.util.HashSet;

import java.util.List;

import java.util.Set;

import org.hibernate.SessionFactory;

import org.hibernate.Transaction;

import org.hibernate.classic.Session;

import Pack.util.HibernateUtil;

public class OneToManyDAOImpl implements OneToManyDAO {

@Override

public void saveCustomer() {

Customer c1 = new Customer();

c1.setCustomerID(101);

c1.setCustomerName("A");

Item i1 = new Item();

i1.setItemID(9001);

i1.setItemName("X");

i1.setPrice(5000);

Item i2 = new Item();

i2.setItemID(9002);

i2.setItemName("Y");

i2.setPrice(6000);

Set items = new HashSet();

items.add(i1);

items.add(i2);

c1.setItems(items);

SessionFactory factory = HibernateUtil.getSessionFactory();

Session ses = factory.openSession();

Transaction tx = ses.beginTransaction();

ses.save(c1);

tx.commit();

ses.close();

}

}