2. Functions of Cinema Application: With these above files, your program output may be look like: List of films: FilmID GenreID Title Country USA Year Iron man I 2010 Impossible mission God father I 2010 USA 1 2010 USA God father II 2010 USA List of rooms: RoomID Name Theatre A NumberRows NumberCols 10 10 Theatre B 10 10 Theatre C 10 5 List of shows: ShowID FildID RoomID Date Price Slot 20-05-2020 10.0 20-05-2020 10.0 6 1 1 20-05-2020 10.0 3 1 20-05-2020 10.0 4 List of bookings: ID ShowID Name Kien Mai 1 Class SE1625, Group 1 MENU 1. Register a show 2. Book seats for a show 3. Exit Please enter in the range (1 - 3] :
Q: A function is similar to a procedure or sub-module but a function can do this _________ while a…
A: let us see the answer:- 1) The correct option is c) Return a value. Explanation:-A Sub Procedure…
Q: The Payroll Department keeps a list of employee information for each pay period in a text file. The…
A: Required: Write a program that inputs a filename from the user and prints to the terminal a report…
Q: The program must read through a timesheet file (Timesheets.csv) and process the payroll by reading…
A: The code is
Q: Description Here is a sample interaction between a user and the program you will write in the…
A: The program will be created as follows: Create a class Student. Class Student has data members-…
Q: Program a python program that demonstrates reading and comparing Create a python program…
A: According to the information given:- We have to follow the instruction to get the desired outcome.
Q: Create a program with c++ that allows you to view and edit the sales amounts for each month of the…
A:
Q: Create a python program that demonstrates reading and comparing multiple files, processes the input…
A: According to the Bartelby guideline we are suppose to answer only one question at a time. Kindly…
Q: Make a C++ Student Registration And Mark List System where users can register students as well as…
A: I will provide a commented c++code. So just read it once and you will easily understand it. variable…
Q: The text file examScores.dat contains a list of numbers representing student exam scores. Write a…
A: %load the scores data=load('examScores.dat','-ascii'); %using inbuilt functions to calculate…
Q: Get and save the current date and time ● Create a variable start using the function clock What is…
A: It is required to write a program in matlab named startTime, where two functions clock and datestr…
Q: In c++. I have been stuck on this problem. I am not sure i keep getting errors can someone please…
A: NOTE Below is the program for the given question. Hope you understand it well. If you have any…
Q: { int size = 0; Scanner keyboard = new Scanner (System.in); System.out.println("Welcome to the Robot…
A: It is defined as an array data structure, or simply an array, is a data structure consisting of a…
Q: I have been having trouble with this assignment. Attached will ben the assignment guide lines and my…
A: compilation failed
Q: Directions: Use a file city.txt for answering the questions that follow each scheduling algorithm.…
A: Directions: Use a file city.txt for answering the questions that follow each scheduling algorithm.…
Q: Need help with question. Sample output below. Coding language is python. Copy your solution from…
A: Solution for given question - def total(totalP): print("----------------------------")…
Q: Geraldine's Landscaping Service and Gerard's Lawn Maintenance are merging their businesses and want…
A: Since here no programming language is specified. So, we are providing the program code in C++.…
Q: You will build a system to manage patients’ data in a hospital. The hospital patient management…
A: Actually, program is a executable software that runs on a computer.
Q: file containing data about some students' options regarding a set of optional subjects is given. The…
A: To read data from the file #include <stdio.h> int main(void){ char name[50000]; int…
Q: Average grades bar chart Write a python program grades.py that reads a file of assignment grades…
A: In this question we have to write a python program to generate average grades bar chart. Let's code
Q: roduct sold by the juice machine. 2. Let the customer make the selection. 3. Show the customer the…
A: Q. Fruit Juice MachineIn this programming example, there are one function available which is main()…
Q: • The Emerging Manufacturing Company has decided to use its new computer for payroll. • You have…
A: Java Program: import java.util.*; import java.io.*; class Employee { private String id;…
Q: The client should read in the file contents and store them in the object. The file will be formatted…
A: Actually, program is a executable software that runs on a computer.
Q: i) Read these names using a C++ program ii) Print the city names having 3 letters before space.
A: Print the city names having 3 letters before space which means 4th character must be space
Q: Python Question: myfile = open('sales.txt','r') Which statement is correct if the next line in a…
A: 1) We have a file sales.txt in which next line holds unit price of an item 2) We want to read the…
Q: Sin with Drawline Call the file: sinDrawline.cpp Create 2 functions: 1) Degrees2Radians: which…
A: Code: #include <iostream>#include <cmath>using namespace std; double…
Q: Write a program that consists of two function: 1. A function that reads the contents of a file…
A: Use a list to store the values from file and then you can use list functions for finding max, min,…
Q: You will build a system to manage patients' data in a hospital. The hospital patient management…
A: Code for the given problem below :-
Q: Question5: You are given a file consisting of students' names in the following form: lastName,…
A: Given:
Q: 1. You are required to complete a computing project that applies the concepts that we have learned…
A: Ans 1) Code:- #include <iostream> #include <fstream> using namespace std; //class…
Q: a- The highest mark in programming (prg). b- The lowest mark in logic. c- The average of math marks.…
A: #include<bits/stdc++.h> using namespace std; int main() { string l,w; int nn=0;…
Q: 1. Carbohydrate 2. Protein 3. Fat Please enter your choice>> 2 1. Low 2. Moderate 3. High Please…
A: Please check the step 2 for solution
Q: elop a program that asks for the user's name, phone number, and address. The program then saves all…
A: Hey there, I am writing the required solution of the above stated question.Please do find the…
Q: scores.txt : Jan,86 Drew,92 Blake,85 Alex,81 Taylor,88 Jordan ,72 Cam,89 Note: code is written…
A: The answer for the above given question is given blow:
Q: The following table that is available in a file “rain.txt" shows the amount of rain in mm³ that fell…
A: Why files are needed? When a program is terminated, the entire data is lost. Storing in a file will…
Q: Python Please! Create a program that will allow a user to do either of the following things: Get…
A: Given: Python Please! Create a program that will allow a user to do either of the following things:…
Q: rogram reads, formats and prints a restaurant menu from a text file. User enters menu items by name…
A: Required: Program reads, formats and prints a restaurant menu from a text file. User enters menu…
Q: Directions: Use a file city.txt for answering the questions that follow each scheduling algorithm.…
A: Note: As you have not given the city.txt file. I have written the program for the given sample input…
Q: The program will require you to design 2 ADTS as described below: [1] VIDEO ADT Data Operations…
A: As per my understanding, Our program should be able to perform the following operations: Return, or…
Q: Write a program named program61.py This program will have three functions, the main() create() and…
A: Programmed in Python using Jupyter Code: # Function to create grades.txt def create(): with…
Q: Write a C++ program. Name the file laundry.cpp You just purchased an existing laundromat. Create a…
A: Actually, program is a executable software that runs on a computer.
Q: Sample screen output from part 2 HOMEWORK 5 PART 2 Enter the name of the user Jane Q. Doe Enter the…
A: Given:
Q: cout > emp; return emp; } int main() { int numberOfEmployees = NumOfEmployees(); int…
A: #include<iostream>#include<fstream>using namespace std;/*Create a global variable of…
Q: The Payroll Department keeps a list of employee information for each pay period in a text file. The…
A: In this program the followings steps are being followed: take the filename as an input from the…
Q: The Payroll Department keeps a list of employee information for each pay period in a text file. The…
A: Actually, python is a easiest programming language. It is a dynamically typed programming language.…
Q: A Comma Separated Value (CSV) text file called movies.txt is located in the directory of your…
A: Code snippet:
Q: This C++ mini project on STUDENT REPORT CARD has student class with data members like roll no, name,…
A: Solution: //C++ code: //Include necessary header…
Q: pseudo code for the code //C++ Code #include #include using namespace std; /*Create a global…
A: In the following question, we have been given a code and description of the whole code. The code has…
Q: #function read file and display report def displayAverage(fileName): #open the file infile =…
A: I have provided PYTHON CODE, CODE SCREENSHOT , TXT FILE SCREENSHOT and OUTPUT…
Q: The student information is seperated by a comma and is in the following format :…
A: The program is written in cpp
Q: Information for 20 customers of a bank is stored in a random Access file named musteri.dat using the…
A: // File Name:CustomerAccount.c #include <stdio.h>#include <stdlib.h>#include…
Please use "C" code
Step by step
Solved in 2 steps
- Lab 8.1 - Using Value and Reference Parameters In Visual Studio Code under labactivity8_1 folder, create a new file main.cpp. Open the C++ source file main.cpp in the text editor and copy the source code below. /** * @file WRITE FILE NAME * @author WRITE STUDENT NAME(S) * @brief Using value and reference parameters. This program * uses a function to swap the values in two variables. * @date WRITE DATE TODAY * */ #include <iostream> using namespace std; // Function prototype void swapNums(int number1, int number2); int main() { int num1 = 5, num2 = 7; // Print the two variable values cout << "In main the two numbers are " << num1 << " and " << num2 << endl; // Call a function to swap the values stored // in the two variables swapNums(num1, num2); // Print the same two variable values again cout << "Back in main again the two numbers are " << num1 << " and " << num2 << endl; return 0; } /** * @brief WRITE DESCRIPTION OF…Lab 8.1 - Using Value and Reference Parameters In Visual Studio Code under labactivity8_1 folder, create a new file main.cpp. Open the C++ source file main.cpp in the text editor and copy the source code below. /** * @file WRITE FILE NAME * @author WRITE STUDENT NAME(S) * @brief Using value and reference parameters. This program * uses a function to swap the values in two variables. * @date WRITE DATE TODAY * */ #include <iostream> using namespace std; // Function prototype void swapNums(int number1, int number2); int main() { int num1 = 5, num2 = 7; // Print the two variable values cout << "In main the two numbers are " << num1 << " and " << num2 << endl; // Call a function to swap the values stored // in the two variables swapNums(num1, num2); // Print the same two variable values again cout << "Back in main again the two numbers are " << num1 << " and " << num2 << endl; return 0; } /** * @brief WRITE DESCRIPTION OF…Average grades bar chart Write a python program grades.py that reads a file of assignment grades and draws a bar chart of the average grades for each assignment. Save the figure as grades.png in the current working directory. The format of a line in the file is: assignment_type grade Note that there is a single space between the assignment type and the grade. E.g. exam 92.80 Your program must contain the following functions: Function name Function description Function input(s) Function return value(s) get_grades() This function takes a file name as input and populates a dictionary containing the assignment types and grades. Filename string Dictionary of grades main() This function prompts for the grades file name. Next, it calls the functions get_grades(). Next, it draws the bar chart of the average grade for each assignment. Hint: You can use the mean function of the statistics module to calculate the average of a list. None None Use the starter…
- Finish this program from the code posted below! Note: There should be two files Main.py and Contact.py You will implement the edit_contact function. In the function, do the following: Ask the user to enter the name of the contact they want to edit. If the contact exists, in a loop, give them the following choices Remove one of the phone numbers from that Contact. Add a phone number to that Contact. Change that Contact's email address. Change that Contact's name (if they do this, you will have to remove the key/value pair from the dictionary and re-add it, since the key is the contact’s name. Use the dictionary's pop method for this!) Stop editing the Contact Once the user is finished making changes to the Contact, the function should return. Code:from Contact import Contactimport pickledef load_contacts():""" Unpickle the data on mydata.dat and save it to a dictionaryReturn an empty dictionary if the file doesn't exist """try:with open("mydata.dat", 'rb') as file:return…FLowchart of the following pseudo code START OF FUNCTION search_vaccine()infile = open file Vaccine.txt in read modePrint Enter Vaccine Code to Search : Input vcodeIf infile is NULL Print Vaccine.txt file not foundEnd ifCopy vcode to tempWhile not EOF of infile read vaccName,vaccCode,country,qty,populaion from infile if(vaccCode[0] == temp[0] and vaccCode[1] == temp[1]) Print "Vaccine Name","Vaccine Code","Country","Dosage","Population" Print vaccName,vaccCode,country,qty,populaionEnd whileClose infileEND OF FUNCTION search_vaccine()A Comma Separated Value (CSV) text file called movies.txt is located in the directory of your Eclipse Project.( If your Eclipse Project name is Assignment2, the text file is located under Assignment2, NOT src folder) It contains data for one movie on each line.Each Movie contains the following data items:Title(String), Year(int-4 digits), Runtime(double). Write Java program(s) to do the following:1) Read the movies.txt Text file and write the data as a Serialized file called movies.ser to the local directory(same as movies.txt).2) Read the movies.ser serialized file and output the data on to the Console in the format shown below. The spacing for the output is: Title(20), Year (8) and Runtime (10.2)Title and Year are left-justified, Runtime is right-justified.(You can use your own text file to test your program) Sample output: Title Year Runtime aaaaaaaaaaa aaaa aa.aa...... ...... ...........…
- #function read file and display reportdef displayAverage(fileName):#open the fileinfile = open(fileName, "r")#variable declaration and initializationtotal = 0count = 0#read filefor num in infile:total = total + float(num)count = count + 1#close the fileinfile.close()#calculate averageaverage = total / count#display the resultprint("Average {:.1f}".format(average)) #method callingdisplayAverage("numbers.txt")This is a program in C language. Help me debug this program. it has 3 errors. Please upload a screenshot also that it is working thank you./* This porgram uses the gotoxy() function and textcolor() for better screen display */ #include <iostream>#include <conio.h>#include <stdlib.h>using namespace std;main(){ int NoItem,ItemNo,Qty,ctr,Row=5; float UPrice,TAmt,ATendered,Change,APaid=0; char ItemDesc[15],TempChar; system("Color 5");; system("Color 2"); gotoxy(25,1);cout<< "[***] RICHLY SUPERMARKET [***]"; gotoxy(31,2);cout<< "Ayala Avenue, Makati"; gotoxy(6,4);cout<< "Item No. Description Qty. Unit Price Total Amount"; gotoxy(5,22);cout<< "No. of Item(s) Bought => [ ]"; gotoxy(37,22);cout<< "Total Amount to be Paid => "; gotoxy(37,23);cout<< "Amount Customer Tendered => "; gotoxy(37,24);cout<< "Amount of Change => "; gotoxy(31,22);cin>> NoItem;…create a function it takes a file name as an arguments and returns whether it exist or not, if it then it's a folder or a file. This task is from shell scrpting
- String variables userName and className are read from input. Use variables userName, className, and verbDescription to output the following. End with a newline. Ex: If the input is Eli Databases, then the output is: Eli is studying Databases. #include <iostream> #include <string> using namespace std; int main() { string userName; string className; string verbDescription = "is studying"; cin >> userName; cin >> className; /* Your code goes here */ return 0; }Transcribed Image Text Problem 3) Create a text file that contains the following information: John Doe 2005 124.80 36 Note that the fist line represents the name of the client, the second line represents the year in which the client started an account with this insurance company. The third line represent the monthly payment for the insurance. The fourth line represents the number of months left in the insurance policy. Write a C++ program that will read this file and will display the client's name, the number of years for which this client has been with the company, and the remaining amount they have to payLook at this program: int main(){ int x = 4; displayMessage(); return 0;}void displayMessage(){ for(int x = 1; x <= 100; x++) cout << "I love computer science" << endl;} What will the output be? Answers: Nothing. It won't compile because you can't define the variable x inside a loop heading. Nothing. It won't compile because the displayMessage function is being called before it has been defined "I love computer science" 100 times "I love computer science" Nothing. It won't compile because you can't call a void metho