Car.h" #include "Station.h" #include using namespace std; extern void te
Q: ores floating poin
A: Q. In C++ create a hash table that stores floating point numbers.
Q: In Java programming Write the code to print out an inventory report. Your code must read each…
A: In Java programming Write the code to print out an inventory report. Your code must read each…
Q: Turn this into a flowchart/pseudo code.
A: Summary Pseudocode is a sequence of simplified steps used to solve a problem by implementing in a…
Q: Generics enable you to specify the exact type that will be stored in a collection and give you the…
A: Introduction Java programming: Java is cross-platform, meaning it can run on any operating system,…
Q: Implementing the Customer Class We've partially defined the Customer class for you in "customer.h"…
A: Create a Customer class with member variables for the name of the customer, the number of products…
Q: Generate the driver file (main.cpp) where you perform the following tasks. Note that you cannot make…
A: I have added main.cpp as per the given description: given code: #ifndef…
Q: C++ Question You need to write a class called LinkedList that implements the following List…
A: #include <iostream> using namespace std; struct node { int data; node *next; };…
Q: Explain the flow of the code not necessarily every line, as long as you explain what the important…
A: High level Explanation: The given code implements a deque that is doubly ended queue with the help…
Q: SKELETON CODE IS PROVIDED ALONG WITH C AND H FILES. #include #include #include #include…
A: Below find the solution else { stack.push(current_visting); for (auto i = vertices[size].begin(); i…
Q: //Server.c #include "csapp.h" void *thread(void *vargp); int main(int argc, char *argv[]) { int…
A: In this question for the given code we have to provide demonstration of these two files and discuss…
Q: ng Language Given the code below 1.Change all of the low-level arrays in your program to use the…
A: It is defined as a general-purpose, modern and object-oriented programming language pronounced as “C…
Q: Purpose of this assignment: To allow student to be able to implement a Java thread-based application…
A: In the given assignment two logics are seen that is fibonacci series and factorial number. Fibonacci…
Q: In Java programming Write the code to print out a customer report. Your code must read each…
A: Use the customer object name from Customer customer = new Customer ( “ customer name” ); the…
Q: var id = document.getElementById var pass = document..getElement. if ((id == null ; id == "") &&…
A: Below the right code
Q: A c++ code that performs a search for a specific employee and returns the employee ID if found and 0…
A: Algorithm:- declare a employee class with data members as empID. declare a class…
Q: In Java programming Write the code to print out an order for an individual customer. Your code…
A: Here, we have to Write the signature line for this method. Write the line of code to display the…
Q: public class PasswordGeneratorAndStorage
A: Here is the answer which is mentioned below: When i ran this code, i did not had any problem,…
Q: mkfifo("mypipe"); if (!fork()) { fp popen("echo 37 > mypipe", "w"); status = pclose(fp); } else {…
A: First of all the program creates a pipe named mypipe. After that the fork() command is executed.…
Q: Concurrent Server Programming TITLE: Quiz Game In this assignment you are asked to write a phyton…
A: To run the math contest program with the concurrent server and client, follow these steps: Server:…
Q: You need to write a class called LinkedList that implements the following List operations: public…
A: please see the code below: please comment if you need more help on this. or post another question!!…
Q: def __getitem__(self, lhs: Union[int. list[bool]]) -> Union[float, Runner]: The function should take…
A: Below i have written:
Q: Java programming Write the code to print out an order report. Your code must read each order header…
A: The question is asking you to write Java code to print out an order report. You need to read each…
Q: PingPong class that implements the Runnable interface and will write ping or pong in a
A: Q Write a PingPong class that implements the Runnable interface and will write ping or pong in a…
Q: You should create a loop which will ask user if they want to insert, delete, display and exit. Then…
A: Please find the answer below :
Q: Implementing the Customer Class We've partially defined the customer class for you in "customer.h"…
A: #include <memory>#include <string>class Customer {public:// ====================== YOUR…
Q: C#: • Using System.Threading • Create a Baby class • It should have variables: time (int) and name…
A: Sample Output Screenshot:
Q: File System: It is highly useful in file system handling where for example the file allocation table…
A: The free disk blocks are linked together in this way, with each free block containing a pointer to…
Q: main.cc file #include #include #include "train.h" int main() { // Creates a train, with the…
A: Coded using C++ and verified the output according to the question.
Q: C Sharp How do I format my code to 2 decimal places whem I am calling my code in Main using…
A: Let's break down the solution into a step-by-step process, focusing on how it accomplishes the task…
Q: In C++ create a hash table that stores char
A: We can build the Hash table manually or using STL library. I ma building the Hash table here…
Q: Implementing Abstract Data Types with Linked Lists. Goals: -review abstract data types such as…
A: The below code answers the above problem for stack and queue implementation using LinkedList. The…
Q: This file has syntax and/or logical errors. Determine the problem and fix the program.
A: Below im attaching the code :
Q: #SumCalculator Class: Create a class named SumCalculator that extends the Thread class. This class…
A: Algorithm of the code: 1. start 2. Create two SumCalculator threads to calculate the sum of two…
Q: C++ Programming Requirments: Please submit just one file for the classes and main to test the…
A: Algorithm: START Define the ListNode class with integer data and a pointer to the next node. Define…
Q: void getVectorSize(int& size); void readData(vector& scores); void sortData(vector& scores);…
A: The code for the above-given question is given below:
Q: Another name for link files in EnCase is gui shared data favorites shortcuts
A: Link files refer to, or link to, target files. These target files can be applications, directories,…
Please help with the TODO functions
#include "Car.h"
#include "Station.h"
#include <thread>
using namespace std;
extern void testACar(void*);
Car::Car(void)
{
fillCount = 0;
tryCount = 0;
thread = nullptr;
stationToUse = nullptr;
numberWaitingInLine = nullptr;
}
void Car::startCar(void testACar(Car* car))
{
///////////////////////////////////////////////////////////////////////////
// TODO: Start the thread that will be used for the car
//(these will be joinable threads)
///////////////////////////////////////////////////////////////////////////
}
void Car::waitForCarToStop(void)
{
///////////////////////////////////////////////////////////////////////////
// TODO: stop and clean up the car threads
///////////////////////////////////////////////////////////////////////////
}
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- main.cc file #include <iostream>#include <memory> #include "train.h" int main() { // Creates a train, with the locomotive at the front of the train. // LinkedList diagram: // Locomotive -> First Class -> Business Class -> Cafe Car -> Carriage 1 -> // Carriage 2 std::shared_ptr<Train> carriage2 = std::make_shared<Train>(100, 100, nullptr); std::shared_ptr<Train> carriage1 = std::make_shared<Train>(220, 220, carriage2); std::shared_ptr<Train> cafe_car = std::make_shared<Train>(250, 250, carriage1); std::shared_ptr<Train> business_class = std::make_shared<Train>(50, 50, cafe_car); std::shared_ptr<Train> first_class = std::make_shared<Train>(20, 20, business_class); std::shared_ptr<Train> locomotive = std::make_shared<Train>(1, 1, first_class); std::cout << "Total passengers in the train: "; // =================== YOUR CODE HERE…main.cc file #include <iostream>#include <memory> #include "customer.h" int main() { // Creates a line of customers with Adele at the front. // LinkedList diagram: // Adele -> Kehlani -> Giveon -> Drake -> Ruel std::shared_ptr<Customer> ruel = std::make_shared<Customer>("Ruel", 5, nullptr); std::shared_ptr<Customer> drake = std::make_shared<Customer>("Drake", 8, ruel); std::shared_ptr<Customer> giveon = std::make_shared<Customer>("Giveon", 2, drake); std::shared_ptr<Customer> kehlani = std::make_shared<Customer>("Kehlani", 15, giveon); std::shared_ptr<Customer> adele = std::make_shared<Customer>("Adele", 4, kehlani); std::cout << "Total customers waiting: "; // =================== YOUR CODE HERE =================== // 1. Print out the total number of customers waiting // in line by invoking TotalCustomersInLine. //…main.cc file #include <iostream>#include <memory> #include "customer.h" int main() { // Creates a line of customers with Adele at the front. // LinkedList diagram: // Adele -> Kehlani -> Giveon -> Drake -> Ruel std::shared_ptr<Customer> ruel = std::make_shared<Customer>("Ruel", 5, nullptr); std::shared_ptr<Customer> drake = std::make_shared<Customer>("Drake", 8, ruel); std::shared_ptr<Customer> giveon = std::make_shared<Customer>("Giveon", 2, drake); std::shared_ptr<Customer> kehlani = std::make_shared<Customer>("Kehlani", 15, giveon); std::shared_ptr<Customer> adele = std::make_shared<Customer>("Adele", 4, kehlani); std::cout << "Total customers waiting: "; // =================== YOUR CODE HERE =================== // 1. Print out the total number of customers waiting // in line by invoking TotalCustomersInLine. //…
- #include <stdio.h> struct clientData { unsigned int acctNum; char lastName[15]; char firstName[10]; double balance; }; unsigned int enterChoice(void);void textFile(FILE* readPtr);void updateRecord(FILE* fPtr);void newRecord(FILE* fPtr);void deleteRecord(FILE* fPtr); int main(void) { FILE* cfPtr; if ((cfPtr = fopen("accounts.dat", "rb+")) == NULL) { puts("File could not be opened."); } else { unsigned int choice; while ((choice = enterChoice()) != 5) { switch (choice) { case 1: textFile(cfPtr); break; case 2: updateRecord(cfPtr); break; case 3: newRecord(cfPtr); break; case 4: deleteRecord(cfPtr); break; default: puts("Incorrect…CODE(EMU8086) #START = THERMOMETER.EXE##START = LED_DISPLAY.EXE#.STACK 100H .MODEL SMALL .DATA MSG1 DB 10,13,' WELCOME ', DB 10,13,' CHOOSE TYPE OF FOOD ', DB 10,13,'1.) PIZZA 2.) BAKED MACARONI 3.) FRENCH FRIES', DB 10,13,'ENTER: $' MSG2 DB 10,13,'PLEASE SELECT WHAT WILL BE THE MAX TEMPERATURE', DB 10,13,'1.) 20 DEG', DB 10,13,'2.) 40 DEG', DB 10,13,'3.) 60 DEG', DB 10,13,'4.) 80 DEG', DB 10,13,'5.) 100 DEG', DB 10,13,'6.) 119 DEG', DB 10,13,'ENTER: $' NUM1 DB 20 NUM2 DB 40NUM3 DB 60NUM4 DB 80NUM5 DB 100NUM6 DB 119 TIMEOP1 DB 10,13,'SET THE TIMER', DB 10,13,'ENTER 1: 00:00:50', DB 10,13,'ENTER 2: 00:01:40', DB 10,13,'ENTER 3: 00:02:30', DB 10,13,'ENTER 4: 00:03:20', DB 10,13,'ENTER 5: 00:04:10', DB 10,13,'ENTER: $' A DB 0B DB 0C DB 0D DB 0 OPTIONERROR DB 10,13,'INVALID OPTION $' DONE DB 'DONE','$' RESTARTMENU1 DB 10,13,'PRESS 1 TO GO BACK TO MAIN…Computer Science Part C: Interactive Driver Program Write an interactive driver program that creates a Course object (you can decide the name and roster/waitlist sizes). Then, use a loop to interactively allow the user to add students, drop students, or view the course. Display the result (success/failure) of each add/drop.
- C++ Programming Requirments: Please submit just one file for the classes and main to test the classes. Just create the classes before main and submit only one cpp file. Do not create separate header files. Please note: the deleteNode needs to initialize the *nodePtr and the *previousNode. The code to do this can be copied from here:ListNode *nodePtr, *previousNode = nullptr; Part 1: Your own Linked ListDesign your own linked list class to hold a series of integers. The class should have member functions for appending, inserting, and deleting nodes. Don't forget to add a destructor that destroys the list. Demonstrate the class with a driver program.Part 2: List PrintModify the linked list class you created in part 1 to add a print member function. The function should display all the values in the linked list. Test the class by starting with an empty list, adding some elements, and then printing the resulting list out.void getVectorSize(int& size); void readData(vector<Highscore>& scores); void sortData(vector<Highscore>& scores); vector<Highscore>::iterator findLocationOfLargest( const vector<Highscore>::iterator startingLocation, const vector<Highscore>::iterator endingLocation); void displayData(const vector<Highscore>& scores); The size parameter from the given code won't be needed now, since a vector knows its own size. Notice that the findLocationOfLargest() function does not need the vector itself as a parameter, since you can access the vector using the provided iterator parameters. The name field in the struct must still be a c-string The focus of this assignment is to use iterators. You must use iterators wherever possible to access the vector. As a result, you must not use square brackets, the push_back() function, the at() function, etc. Also, the word "index" shouldn't appear in your code anywhere. You won't get full credit if…Current file: Encyclopedia.h Load default 1 #ifndef ENCYCLOPEDIAH 2 #define ENCYCLOPEDIAH 3 4 #include "Book.h" 6 class Encyclopedia : public Book { // TODO: Declare mutator functions - 7 8 // SetEdition(), SetNumVolumes() 9 10 // TODO: Declare accessor functions - GetEdition(), GetNumVolumes() 11 12 // 13 14 // TODO: Declare a PrintInfo() function that overrides the PrintInfo in Book class 15 16 // 17 18 19 // TODO: Declare private fields: edition, numVolumes 20 21 }; 22 23 #endi f
- Suppose that an application declares an array of class objects with the following statement: Employee[] employees = new Employee[9]; Write a loop that creates 10 instances of the class and assigns them to the elements of the array.createDatabaseOfProfiles(String filename) This method creates and populates the database array with the profiles from the input file (profile.txt) filename parameter. Each profile includes a persons' name and two DNA sequences. 1. Reads the number of profiles from the input file AND create the database array to hold that number profiles. 2. Reads the profiles from the input file. 3. For each person in the file 1. creates a Profile object with the information from file (see input file format below). 2. insert the newly created profile into the next position in the database array (instance variable).CPU Scheduling Algorithm Simulator in C++Instructions:Create a .zip file consisting of code, output files, readme file .The readme file should explain briefly your code. The simulator will consists of following classes:(i) Process: The data members of this class should store process id, arrival time in the ready queue,CPU burst time, completion time, turn around time, waiting time, and response time. The memberfunctions of this class should assign values to the data members and print them. A constructorshould also be used.(ii) Process_Creator: This class will create an array of processes and assign a random arrival timeand burst time to each process. Data members, constructor and member functions can be writtenaccordingly.(iii) Scheduler: This class will implement the scheduling algorithm. The class will maintain a readyqueue of infinite capacity (i.e., any number of processes can be accommodated in the queue). Theready queue should be implemented using the min-Heap data structure…