A healthcare enterprise wants to analyze data from multiple…

Questions

Prоgrаmming Midterm 100 pоints Yоu must leаve this honorlock recording while you аre working on the quiz (i.e. don't close the quiz window). 100 points total – You must complete this without talking or chatting or emailing or contacting or asking for help from other people. You may not use AI tools. You may use your books, labs, or resources on your computer etc. You may not use online resources (unless you are using your book or look up the slides). You may assume the input will follow the specification (that is, you don't have to check for the correct input types or index out of bounds). This exam should properly reuse code, that is, code (or variables) should not be duplicated. It should also use proper formatting, comments, and good practices. Points will be taken off if you do not do this. Remember that if you get stuck you should move on. There are a lot of parts in this exam and partial credit is given if you get stuck on a part.   The Bakery Your bakery should be able to hold recipes for simple [recipes], and cakes. You are to read in the recipes from a file, the format is below but the test file can have any number of cakes or simples in any order. I will be testing your programs using different file(s). Simple recipes only have a name and a time they take. Cakes have a name, time, and instructions. Both recipes have a viability score. Simple recipes viability is = time/(length_of_the_name). Cakes viability is = time/(length_of_the_name + how_many_ingredients). Your program should then print out all the recipes (after they are read in) and be able to answer ONE question about them (don’t loop over them). Here are the possible questions. Print which recipe has the highest viability. In the case of a tie, you may print out either. Print a particular recipe. Determine the frequency a particular ingredient is used (so the % of cake recipes that contain that ingredient). I would suggest making your program work with only simple recipes before you try to add in cake recipes. I have given you two sample files for that purpose.   Format of File:               The first number is the file is the amount of cakes and simples. The first line of a cake or a simple will either be $cake$ or $simple$, which indicates whether the subsequent things are part of a cake or a simple. For each item in a cake or a simple, the thing on the left of the = indicates what field is being set and the thing on the right of the = indicates what value. The possible values for the left would be $name$, $time$, $ingredients$. Attributes for a simple will be $name$, $time$, but not necessarily in that order (but they will have those 2 attributes). Attributes for cakes will be $name$, $time$, or $ingredients$, but not necessarily in that order (but they will have those 3 attributes). The cake’s $ingredients$ ends when you read a $end$. Do not assume the amount of new line spaces between fields or recipes.   Sample 1 input file: 3$simple$$time$ = 30$name$ = chocolat $simple$$name$ = cho $time$ = 5$simple$$name$ = ch $time$ = 5   Output A (option 1): chocolatTime: 30Viability: 3.75choTime: 5Viability: 1.6666666666666667chTime: 5Viability: 2.5which option?>> 1max: 3.75   Output B (option 2): chocolatTime: 30Viability: 3.75choTime: 5Viability: 1.6666666666666667chTime: 5Viability: 2.5which option?>> 2Which recipe?>> 1choTime: 5Viability: 1.6666666666666667 Sample 2 input file: 4$simple$$name$ = chocolat $time$ = 30$cake$$name$ = chocolate_lava $time$ = 40$ingredients$ = chocolate flour eggs sugar $end$$cake$$time$ = 50$ingredients$ = flour eggs sugar $end$$name$ = chocolate_lavab $simple$$name$ = cho $time$ = 5 Output: chocolatTime: 30Viability: 3.75chocolate_lavaTime: 40Viability: 2.2222222222222223Ingredients: chocolate flour eggs sugarchocolate_lavabTime: 50Viability: 2.7777777777777777Ingredients: flour eggs sugarchoTime: 5Viability: 1.6666666666666667which option?>> 3Which ingredient?chocolatePercent is: 50.0

A cоmpiler cоnverts а high-level prоgrаm, such аs a C program, into an assembly language program.