fly describe with your own words what the following code is doin ofstream file("Comments.txt"); string line; int size_limit= 20; while (1) getline( cin, line); if (line.size() > size_limit) continue; if (line == "") break; file << line << endl;
Q: 2. A PART file with Part-number as the key filed includes records with the following Part-number…
A: We will solve this question using B+ tree. Below is the solution.
Q: Write the correct combination of HTML tags (ol/ul/li) to produce the following nested list. The code…
A: There are two types of lists in the HTML Ordered List: In this the list elements are appeared as…
Q: Create a package testpkg consisting of two classes A and B, class A being public should have the…
A: Given :
Q: Given the following array declaration: int myArray[10]={1,2,3,4,5,6,7,8,9,10}; How would you…
A: Here in this question we have given an array of size 10 int myArray[10]={1,2,3,4,5,6,7,8,9,10};…
Q: 7.a.Fast in java coding please. Thank you a. Of the search algorithms we covered in this course,…
A: Binary Search Algorithm is the fastest algorithm. This type of search algorithm is used to locate a…
Q: Algorithm to Backtrack Search Restricting Choice of Base Images Input : a group G with a base…
A: procedure generate( G : group; P : property; s : 1..k+l; i : 1..k+1;[)'1, T2 ..... )'i-1] : initial…
Q: X. State the addressing mode used in previous instructions. 2. Discuss the execution of the last…
A: This particular question belongs to Computer Science and Engineering. Computer Science is an…
Q: (b) How many ways are there to assign 24 students to five academic advisors?
A: Solution:- The order of the advisors is important (since a different order leads to some students…
Q: Give a state diagram of DFA recognizing the language with alphabet (0,1} which is given by: {w | w…
A: I have given handwritten solutions of the problem. See below steps.
Q: For variables with private access modifier in a class, select all the apply a. b. Cannot be accessed…
A: The variable with private access modifiers is defined such that we can neither be inherited to the…
Q: Consider the function definition: void function6( int& num1, double num2) { } num1 = num1 * 2; num2…
A: Answer is option 4) 40 1.1
Q: Backtrack Search Algorithm Using First in Orbit A group G with the base B=[I, 2...k] and a powerful…
A: Backtrack Search Algorithm Using First in Orbit:
Q: 10) happens when a learning algorithm does not generalize well over unseen data. a) Pruning b)…
A: machine learning model with insufficient fit is not a suitable model and will be obvious because it…
Q: Give two examples dialogue diagram with drawing using the three types of connection; sequence,…
A: Dialogue mapping is a facilitation technique used to visualize critical thinking as a group. the…
Q: Prove that the following problem is not decidable: Given a Turing Machine M, does the machine reject…
A: A Turing machine which refers to the one it is an abstract computational model that performs…
Q: How has the advent of internet technology facilitated the development of a selected corporate…
A: Introduction: Internet connects computers worldwide. Anyone with Internet connection can converse…
Q: 1- A human factors program can serve as an organizational platform to address humancentric issues in…
A: Introduction: AS PER OUR POLICY “Since you have posted a question with multiple sub-parts, we will…
Q: Which trees have Prüfer sequence 1, 2,..., n - 2? Create a tree of order 7 whose Prüfer sequences is…
A: Prufer sequence is a special sequence that is associated with a tree. An algorithm is implemented to…
Q: create a jframe with clickable image icons.m (text editor, trivia game, and word game. Then make a…
A: In java, many Swing components, such as labels, buttons, and tabbed panes, can be decorated with an…
Q: Prove that if the diameter of a treeTis odd, then any two maximum length paths have a common edge.
A: A Brief introduction of the graph: The Graph is represented by G=(V, E) which is a collection of the…
Q: The most accurate and reliable information help organizations move ahead of their competition. O…
A: Answer is
Q: Interlocking boards impact companies mutually by appointing to their board of directors' executives…
A: Your answer is given below in detail.
Q: Design this pattern in c++
A: Here is the c++ program of the problem. See below steps.
Q: Interfaces can derive from one another to form hierarchies similar to inheritance hierarchies True…
A: Solution:- •Interface :- •An interface specifies the behavior of a class by providing an abstract…
Q: 1. Prompt user for a word 2. Get the length of the word 3. Set the string position to 0 (hint:…
A: The required python program to the given question is : The text of the program: s= input("Enter…
Q: .One can choose the proper decomposition model based on noise. T or F
A: 1. The simulation of human intelligence processes by machines, particularly computer systems, is…
Q: Which of the following is a limitation of deep learning (DL)? DL is not capable of modeling high…
A: Answer: We need to write the what is the limitation of the deep learning (DL). So we will see in the…
Q: Discuss the problems that organizations face to build functional and secure software and the best…
A: Software Assurance Maturity Model is an open framework that helps organizations
Q: According to us, Flynn's taxonomy has to be expanded by one tier. Do these machines have any…
A: Dear Student, The answer to your question is given below -
Q: C level program 1. Write a program that takes an integer n as input (from Keyboard) and compute and…
A: Algorithm : 1. Start.2. Initialize variables n, temp, sum = 0, multiplied and reversed = 0.3. Read…
Q: A web-based application encounters all of the connectivity and compatibility problems that typically…
A: Dear Student, The answers to your questions are given below -
Q: Create a StoredProcedure AddAirline that will prompt the user for all the required fields for the…
A: To begin, launch Microsoft SQL Server Management Studio. Establish a connection to your database…
Q: The way we write phone numbers is a good example of a simple external DSL that is easy to parse with…
A: Phone numbers are a nice example of a basic external DSL that is straightforward to parse with…
Q: In PBFT, suppose that the system consists of 30 nodes, including the primary. Which one of the…
A: The solution to the given question is: The minimum number of replicas that must broadcast ViewChange…
Q: It's recommended to have all setter functions as constant functions. True False
A: Const function members are functions that are declared constant in a program.
Q: For virtual circuits, which of the following is NOT a rule when determining valid virtual circuit…
A: correct option is C) If multiple virtual circuits use the same physical link, it must be called the…
Q: For this question, mark all answers that apply. Which of the following statements about memory…
A: Runtime mapping between a virtual address and a physical address is done by a hardware device
Q: Example: (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16)⟶(1 2 3 4 8 7 6 5 9 10 11 12 16 15 14 13) You may…
A: Follow the given steps to solve the problem: Let the array have R rows and C columns seen[r]…
Q: Lopez to the STUDENT table. Now write a command that will remove this student from the STUDENT…
A: Here There are two types of INSERT INTO statement forms. The first form doesn't specify the column…
Q: Clear my choice Given that Student is a class, how many reference variables and objects are created…
A: Dear Student, The answer to your question is given below -
Q: Write a MATLAB program that ask the user, when running the code, to enter the age of 20 persons…
A: Here is the matlab program of the above problem. See below steps.
Q: Given R=(aa+b* + b+a*)* and S=(a*ba*b + ab*a)* a) Give an example of a string of length five that is…
A: a) abaaa this string neither match R not match S as string in R must start with 'aa', and string in…
Q: 5.b. Fast in java coding please. Thank you 1. What is the difference between method overriding and…
A:
Q: II) Show the changes in the above figure after the letter H is inserted. Node data free = 2 first =…
A: Answer: We have written order for free and first also we have explain in more details with the…
Q: Which may NOT be included in the routing table developed for intra- domain routing? destination…
A: Given: We have to discuss which may Not be included in the routing table developed for…
Q: I am facing some issues while trying to position an image using CSS. In the first section (TITLE), I…
A: The html and css files are modified and given below with output screenshot
Q: Using R programming answer the below question Choose 2 QNT variables plot their scatter plot,…
A: R programming which refers to the one it is has the wide variety of statistics-related libraries and…
Q: Suppose we had a block transfer from an I/O device to memory. The block consists of 1024 words and…
A: Direct Memory Access (DMA) which enables some hardware subsystems to access primary system memory…
Q: Suppose we have the following undirected graph, and we know that the two bolded edges (B-E and G-E)…
A: the following given undirected graph, and we know that the two bolded edges (B-E and G-E) constitute…
Q: Consider the following medical data set on coronary heart disease in Table 1. The task is to predict…
A: Answer the above question are as follows
Step by step
Solved in 2 steps
- Turn this into a flowchart/pseudo code. //This is where the functions go void insertfront(int data);void insert(int data);void display();void deletedata(int data);void reverselist();void searchdata(int data);void swap();void datasort();void deleteList(); #include <iostream>#include <stdlib.h>using namespace std; struct Node {int data;struct Node *next;}; struct Node* head = NULL;struct Node* rhead = NULL;int count1; //insert in front for reversedlistvoid insertfront(int data){Node* new_node = (Node*) malloc(sizeof(Node)); new_node->data = data; new_node->next = rhead; rhead=new_node;}//insert at endvoid insert(int new_data){Node* ptr;ptr = head;Node* new_node = (Node*) malloc(sizeof(Node)); new_node->data = new_data; new_node->next = NULL;if (head == NULL) { head = new_node; } else{while (ptr->next!= NULL) { ptr = ptr->next;}ptr->next=new_node;}count1++;}//display listvoid display() {struct Node* ptr;ptr = head;if(head==NULL){cout<<"Sorry the list…Task: Loading data from files This exercise will require you to load some information from files and use it in your program. scene.txt contains a description of a series of shapes and colours to draw. You need to write code to read in the file data and draw the requested shapes in the correct colour. Each line in scene.txt will contain one of the following starting keywords followed by some data: COLOUR followed by 3 values: R, G, B CIRCLE followed by 3 values: X, Y, RADIUS RECT Followed by 4 values: X, Y, W, H LINE Followed by 4 values: X1, Y1, X2, Y2 CIRCLES are defined from the center. RECT's are defined from the top left. All values are space separated, and you can assume all input is correct (no errors). Please solve this program to draw the scene. I can't upload the file scene.txt, so I decide to screenshot a file for you. Subject: Java ProgrammingIN C++ Write a program that reads movie data from a CSV (comma separated values) file and output the data in a formatted table. The program first reads the name of the CSV file from the user. The program then reads the CSV file and outputs the contents according to the following requirements: Each row contains the title, rating, and all showtimes of a unique movie. A space is placed before and after each vertical separator ('|') in each row. Column 1 displays the movie titles and is left justified with a minimum of 44 characters. If the movie title has more than 44 characters, output the first 44 characters only. Column 2 displays the movie ratings and is right justified with a minimum of 5 characters. Column 3 displays all the showtimes of the same movie, separated by a space. Each row of the CSV file contains the showtime, title, and rating of a movie. Assume data of the same movie are grouped in consecutive rows. Hints: Use the find() function to find the index of a comma in each…
- BASH FLOW CHART: Create a flow chart to describe an algorithm that takes a text file with format ID,FirstName,Last Name,Street,City and appends a user ID field consisting of a C followed by theemployee ID. For example, the first entries in Lab 2's employees.txt are:0,Douglas L,Eberhard,Addenda Circle,Cornwall1,Elizabeth Sua,Hemauer,Wyatt Way,Peterborough2,Bailey Rae,Lopez,Turnagain Street,Sault Ste. MarieAfter processing, the entries should be:0,Douglas L,Eberhard,Addenda Circle,Cornwall,C01,Elizabeth Sua,Hemauer,Wyatt Way,Peterborough,C12,Bailey Rae,Lopez,Turnagain Street,Sault Ste. Marie,C2File.txt contains two lines: This And this is line2 What is the output of the following code snippet? int main() { } ifstream read_file; read_file.open("File.txt"); string line1, line2; read_file >> linel; getline (read_file, line2); cout <Problem Definition You are provided with a text file (employees.txt) containing a number of text lines. Each line contains a record of one employee. Each record has three attributes: Title: string, Prof. (Professor) or Dr. (Doctor). First and Last names: string. Salary: float number. The attributes are separated by the character (','). Figure 1.a, 1.b, and 1.c show a sample of employees.txt files. Dr., Julia Scott,141518 Prof.,Joan Stewart,111673 Mr.,Ali Al-Shukaili,122311 Prof.,Sana Al-Abri,131673 Dr.,Fadi Al-Rasdhi,153790 Ms., Salwa Al-Youssfi, 111675 Dr.,Lillian Brown,67251 Dr.,Julia Scott,141518 Prof.,Joan Stewart Dr., Daniel Cooper,153790 Dr.,Lillian Brown,unknown Dr., Daniel Cooper,153790 Dr.,Lillian Brown,67251 Dr.,Benjamin Russel1,117642 Prof.,Patrick Bailey,72305 Dr., Ralph Flores,118457 Dr., Douglas Flores,181793 Dr.:Benjamin Russell:117642 Figure 1.b: A sample of the text file 'employees.txt Figure 1.a: A sample of the text file 'employees.txt without errors Figure 1.c: A…#include <fstream> #include <iostream> using namespace std; // PLACE YOUR NAME HERE const int MAXNAME = 20; int main() { ifstream inData; inData.open("grades.txt"); char name[MAXNAME + 1]; // holds student name float average; // holds student average inData.get(name,MAXNAME+1); while (inData){ inData >> average; // Fill in the code to print out name and // student average // Fill in the code to complete the while // loop so that the rest of the student // names and average are read in properly } return 0; }Problem Definition You are provided with a text file (employees.txt) containing a number of text lines. Each line contains a record of one employee. Each record has three attributes: Title: string, Prof. (Professor) or Dr. (Doctor). First and Last names: string. Salary: float number. The attributes are separated by the character (',). Figure 1.a, 1.b, and 1.c show a sample of employees.txt files. Dr., Julia Scott, 141518 Dr., Julia Scott, 141518 Prof.,Joan Stewart, 111673 Mr.,Ali Al-shukaili,122311 Prof., Sana Al-Abri, 131673 Prof.,Joan Stewart Dr., Fadi A1-Rasdhi, 153790 Ms., Salwa Al-Youssfi, 111675 Dr., Daniel Cooper, 153790 Dr., Lillian Brown, unknown Dr. :Benjamin Russell:117642 Dr., Daniel Cooper, 153790 Dr., Lillian Brown, 67251 Dr., Benjamin Russell,117642 Prof., Patrick Bailey, 72305 Dr., Ralph Flores, 118457 Dr., Douglas Flores, 181793 Dr., Lillian Brown, 67251 Figure 1.b: A sample of the text file 'employees.txt" Figure 1.a: A sample of the text file 'employees.txt' without…Write a loop that finds the smallest value. Print it and the index code format: #include <iostream>using namespace std; #include <cstdlib> // required for rand() int main(){// Put Part2 code here // Declare smallestFoundSoFar// Q: what should be its initial value?int indexOfSmallest = -1;// sign that it is not initialized Part 2 code #include <iostream> using namespace std; // part 1 code#include <cstdlib> int main() { srand(17); const int ARRAYSIZE = 20; // size for the array int RandArray[ARRAYSIZE]; // array declared int i; // to iterate the loop // this loop will store thei random number in the array for (i = 0; i < ARRAYSIZE; i++) RandArray[i] = rand() % 100; // this loop will print the array for (i = 0; i < ARRAYSIZE; i++) cout <<"randArray["<< i <<"]=" << RandArray[i] << endl; int largestFoundSoFar=-1; // anything is larger than this! int indexOfLargest = -1; // sign that it is not initialized for (i = 0; i…Fix this code please #include <iostream> #include <iomanip> #include <fstream> #include <string> Using namespace std; //Structure to hold each menu item Struct Menultem. { String name; Double price; }; //Function that reads data from file Int getData(struct Menultem menuList[]) { //Opening file for reading Fstream fin("menu.txt", ios::in); Int i=0; Struct Menultem temp; //Loop till entire data is processed While(fin.good()) { //Getting name Getline(fin, temp.name); //Reading price Fin >> temp.price; Fin.ignore(); //Storing in array menuList[i] = temp; i++; } //Closing file Fin.close(); Return i; } //Function that displays menu Void showMenu(struct Menultem menuList[], int cnt) Int i; Cout<<"\n Welcome to the Programmers' Cafe \n\n-Today's Menu--------\n"; //Looping over menu and printing to user For(i=0; i<cnt; i++) { //Printing menu item Cout << fixed << setprecision(2]; Cout << "\n" << right <<setw(3) << (i+1)…C++ Add a search command that asks the user for a string and finds the first line that contains that string. The search starts at the first line currently displayed and stops at the end of the file. If the string is found, the line that contains it is displayed at the top. In case the user enters a string X that does not occur in the file, the program should print the error message: ERROR: string "X" was not found. Attached is the first lines of the .txt file>> classicVinyls.cpp For the following program, you will use the text file called “vinyls.txt” attached to this assignment. The file stores information about a collection of classic vinyls. The records in the file are like the ones on the following sample: Led_Zeppelin Led_Zeppelin 1969 1000.00 The_Prettiest_Star David_Bowie 1973 2000.00 Speedway Elvis_Presley 1968 5000.00 Spirit_in_the_Night Bruce_Springsteen 1973 5000.00 … Write a declaration for a structure named vinylRec that is to be used to store the records for the classic collection system. The fields in the record should include a title (string), an artist (string), the yearReleased (int), and an estimatedPrice(double). Create the following…SEE MORE QUESTIONS