write a code in C language

Completed Posted 3 months ago Paid on delivery
Completed Paid on delivery

1. Write a C program:

a. Simulates the producer consumer problem at a cupcake bakery shop.

i. The baker is the producer

ii. The customer is the consumer that comes to buy the cupcake at the shop

iii. Your program must be able to handle all possible combination of producer and consumer, i.e. one-to-one, one-to-many, many-to-one and many to many

1. There could be one or more bakers that make cupcakes at any one time

2. There should be at least one customer that comes to the store to buy the cupcakes

iv. Once the baker bakes (produces) the cupcakes he will place them, one by one, in a big tray (array) of a certain maximum number (e.g. 30)

1. The tray is a one-dimensional array of struct of flavor and number.

v. The customer will take the cupcakes from this tray (consume), two at a time

vi. Each cupcake is identified by:

1. A tag, which indicates the flavor: There are four flavors - Chocolate, Orange, Vanilla or Strawberry

2. A number: is some random number between 0-99 (or 0-199)

vii. The baker makes (produces) 100 cupcakes during weekdays

viii. The baker makes (produces) double over the weekend

ix. The bakery shop is closed as soon as all cupcakes are sold

b. User has a choice of running the program

i. Interactively

ii. or Reading from a file.

c. Inputs (are provided interactively or through the file):

i. The number of bakers

ii. The number of customers

iii. Weekdays vs weekends

iv. Maximum array size (dynamically allocated)

d. produce the result in the output file

e. Good programming practices must be reflected in the code, such as:

i. Proper naming of variable

ii. Use of comments

iii. Use of indentation

2. Test your program with the test file that will be provided to you

3. Project report.

a. Includes:

i. Screen capture images of the output

ii. Discussion on the results

iii. Important part of your code with description

iv. A table of group members and the tasks carried out by each

C Programming Software Architecture

Project ID: #37481293

About the project

11 proposals Remote project Active 3 mos ago

Awarded to:


Hello, there. My Name is John, and I am an expert of developing algorithm. I am very familiar with C|C++ language. I am very interested in your project. I am sure I can finish your project on time perfectly. I am looki More

$20 USD in 1 day
(0 Reviews)

11 freelancers are bidding on average $22 for this job


Hi there yes I am expert in C and I can help you out for sure Kindly send me a message we'll discuss further Looking forward to hear you Thank you

$20 USD in 1 day
(210 Reviews)

Hello! I can perfectly complete your C task, based on my strong C/C++ Programming skills in only 1 day. Please open the chat with me so that I can start working for you. Regards.

$30 USD in 1 day
(1 Review)

Dear Client, my name is GLEN and I am a qualified C programmer and software architect with over 10 years of experience. I understand that you are looking for someone to write a code in C language that simulates the pro More

$20 USD in 1 day
(0 Reviews)

Hello there Raneem Ahmad A., Good evening! I am professional mobile software engineer with skills including Software Architecture and C Programming. Please send a message to discuss more regarding this project. I More

$10 USD in 4 days
(0 Reviews)

Hi, I have read your project details. I am interested in your work. You can message me, your work related to my expertise and I am sure I can do it. I am a software engineer and have great experience in C language. You More

$20 USD in 7 days
(0 Reviews)

Greetings Dear Client, Welcome to my profile, Home to Professional and Quality services with 100% customer satisfaction guarantee. I'm a Certified Developer & Experienced Expert in C. Dear Client, I take this opportun More

$30 USD in 1 day
(0 Reviews)

Hello! I am happy to bid on your project. I will perfectly develop your C code for simulating the producer consumer problem at a cupcake bakery shop, based on my strong C/C++ skills and experience in only 1 day. I loo More

$30 USD in 1 day
(0 Reviews)

Hi client, My name is Waqas. I have more than 10 years of experience in programming especially using C/C++. After reading your requirements, I ensure you to complete your job with quality code. So I offer my services f More

$20 USD in 7 days
(0 Reviews)

Dear client, I understand that you are looking for someone to write a code in C language to simulate the producer consumer problem at a cupcake bakery shop. Specifically, you require that program be able to handle all More

$20 USD in 7 days
(0 Reviews)

Develop a C program to simulate the interaction between bakers and customers in a cupcake store, allowing various combinations of production and consumption. The code will follow best practices, accept interactive or f More

$20 USD in 3 days
(0 Reviews)