1.Accept a command line argument which is the purchase data file in the following format: Here is an example of the data file: Num_purchase(int) symbol (string) price(double) FILE FOR INPUT: TC 30.13 200 CSCO 24.00 50 IBM 130.00 100 AAPL 94.28 Define a new C++ "Stock" class that manages a stock price, number of share and stock symbol, must be in private Store data from file into vector NUM, SYMBOL,PRICE DISPLAY all data in the following format: Num_purchase, symbol, price, total(total is caculate by mutiply Num-purchase with price). amount>= : display all data have a total >= the given total create function name Find so that you can find : display all purchase only for that symbol
Q: Suppose a 10-Mbps Ethernet hub (repeater) is replaced by a 10-Mbps switch, in an environment where…
A:
Q: Write a program that takes an integer as an input and returns whether it is a prime number or not.
A: Q. Write a program that takes an integer as an input and returns whether it is a prime number or…
Q: minimum-cost SOP and minimum-cost POS expre
A:
Q: What is needed to build a database in the physical world? Make a list of some of the most popular…
A: A database is a software that manages data in organized manner. A database is used when huge volume…
Q: For the following CLSM subnetting problems, submit: a. bits for subnet b. bits for host c. subnet…
A: The given range is : 225.10.20.0/24 Number of bits used for Subnetting is 24 which means 24 bit from…
Q: (a) Young's double-slit experiment is performed with 525-nm light and a distance of 2.00 m between…
A:
Q: hops (1 hop=4km), the signal propagation speed is 2000 km/s and the line Assume that each packet is…
A: The answer is
Q: You are hired to design a reliable byte-stream protocol that uses a sliding window (like TCP). This…
A: Given, Bandwidth = 1 Gbps = 109 bps = (109 /8) bytes per second Round Trip Time = RTT= 100ms = 0.1…
Q: Suppose that one byte in a buffer covered by the Internet checksum algorithm needs to be decremented…
A: The input to the algorithm is shown below:- Original checksum Byte position that is to be…
Q: You have an array of N integers. You need to make this array good. An array A1,A2,A3... AN…
A: Introduction: => Let cnt0 be the number of subsequences of [0], cnt1 be the number of…
Q: Suppose that one byte in a buffer covered by the Internet checksum algorithm needs to be decremented…
A: Introduction A checksum is a procedure used to decide the genuineness of gotten information, that is…
Q: C++ 1.Accept a command line argument which is the purchase data file in the following format: Here…
A: Initialize all the required header files. Save the given data into some file let us transaction.txt.…
Q: The dining philosopher problem is a classic problem in deadlock management. The problem can be…
A: PROGRAM INTRODUCTION: Include the required header files. Define the values of the required…
Q: pts two inputs: the phrase/sentence string (text) and the pattern string (word). This method finds…
A: Coded using Java.
Q: nd the smallest Max ] is in the receive wi e. nowing that MaxSec
A: 1) The smallest working value for MaxSeqNum is 8 It suffices to show that if DATA[8] is in the…
Q: Suppose the Ethernet transmission algorithm is modified as follows: After each successful…
A: Ethernet Transmission Algorithm: In this, the channel is detected prior to sending the information.…
Q: What is a firewall's principal purpose? What are the general guidelines for using packet filtering?
A: The question has been answered in step2
Q: . Why isn't it practical for each node in a sensor net to learn its location by using GPS? Describe…
A:
Q: I am having an error in the following java method. pipeline <- javaMethod('createCoreNLP',…
A: Sys.setenv(JAVA_HOME='C:\\Program Files\\Java\\jdk-18.0.1.1')library(rJava) library(coreNLP)options(…
Q: Prove the following equality: (n+3)(n+2) 2 n+3 n+1 for n-1
A:
Q: Path MTU is the smallest MTU of any link on the current path (route) between two hosts. Assume we…
A: The Path MTU is smallest MTU. Now in that case, The Path MTU size is 576 bytes. So, the maximum…
Q: A micro instruction format has micro operation field which is divided into 2 subfields F1 and F2,…
A: Logic , if there are n micro- operation then we can represent it in form of 2n where n will…
Q: Write a c program to rearrange a list of number in ascending and descending order. also provide…
A: The C program is given below with code and output screenshots Also, the flowchart and interpretation…
Q: Consider a simple protocol for transferring files over a link. After some initial negotiation, A…
A: Stop-and-wait stop and wait, implies, that anything the information that the shipper needs to send,…
Q: “Supporting a travel agency, TORS maintains tour information and provides reservation facilities for…
A: Use case diagram is used to show interaction of user with system by graphical representation.
Q: Indices can speed up query processing, but it's usually a terrible idea to index every attr…
A: The answer is
Q: Indices can speed up query processing, but it's usually a terrible idea to index every attribute,…
A: Through the creation of pointers to the locations of data within a database, indexing speeds up…
Q: Change your previous temperature conversion program so that it will converts the temperatures from 1…
A: As per the requirement program is developed. Note: In the question programming language is not…
Q: two times incorrect includingp code.
A: Here,Use a for loop to iterate from 1 to given number n and then check for each of the number in…
Q: In a stack, items are added and deleted only at one end, referred to as the of the stack.
A: Stack:- The Stack is a linear data structure that follows a particular order in which the operations…
Q: What security flaws are exploited and how may these issues be addressed in the future in the case of…
A: Introduction: Data damage is defined as any decrease in data integrity or availability. Damage to a…
Q: Give some details of how you might augment the sliding window protocol with flow control by having…
A: In sliding window protocol, the sender holds three variables: sender window size denoted by SWS…
Q: (Code the program in C language, which prompts with appropriate expressions such as your Large or…
A: We need to generate random number: Algorithms: 1. Read the integer 2. Use in built random function…
Q: 1.a)Given an array which is sorted in descending [large to small] order and got no repeated numbers.…
A:
Q: 1.Accept a command line argument which is the purchase data file in the following format: Here is an…
A: File content: 200 CSCO 24.00 50 IBM 130.00 100 AAPL 94.28 Program: #include <iostream>#include…
Q: (i) A sequence diagram can describe the architecture elements of a software application. (ii) Both…
A:
Q: Suppose the Ethernet transmission algorithm is modified as follows: After each successful…
A: Before transferring the data, the channel is detected in accordance with the Ethernet Transmission…
Q: 3.11 LAB: Smallest number Write a program whose inputs are three integers, and whose output is the…
A: Question given - Write a program that display smallest value among three values. Solution -…
Q: > Let L = {a"b":n>0} a. Show that L² is a context-free language. b. Show that L' is a context-free…
A: Context free language is the language that is generated by the context free grammar or according to…
Q: Change your Virtual Memory pagefile to the following capacity: Initial Size: 10MB Maximum size:…
A: We need to change the Virtual Memory pagefile of our system and provide steps and screenshots.
Q: arise se tr on system?
A: Computer failure and loss are central points of contention bringing about pointlessly significant…
Q: time domain specification? define corner frequency ?
A: The answer for the above mentioned question is given in the following steps for your reference.
Q: One property of addresses is that they are unique; if two nodes had the same address, it would be…
A:
Q: C++ 1.Accept a command line argument which is the purchase data file in the following format: Here…
A: File content: 200 CSCO 24.00 50 IBM 130.00 100 AAPL 94.28 Program: #include <iostream>#include…
Q: Assume that 35% of a program cannot be sped up, and the remaining 65% has no dependencies and hence…
A:
Q: Calculate the latency (from first bit sent to last bit received) for: (a) 1-Gbps Ethernet with a…
A:
Q: . Discuss the relative performance needs of the following applications in terms of average…
A:
Q: Show how the decimal floating point number -76.310 is stored in the computer's storage using IEEE754…
A: Here is the solution in which we have asked to convert decimal number into IEEE-754 32 bit format.
Q: Some parameters in Google searching the "lr" code, which does what?
A: The full form of lr is language restrict
Q: d) Show how the decimal floating point number -76.310 is stored in the computer's storage using…
A: The IEEE Standard for Floating-Point Arithmetic (IEEE 754) is a technical standard for…
Step by step
Solved in 3 steps with 1 images
- C++ Create program that uses commands: 1.Accept a command line argument which is the purchase data file in the following format: Here is an example of the data file: Num_purchase(int) symbol (string) price(double) FILE FOR INPUT: TC 30.13 200 CSCO 24.00 50 IBM 130.00 100 AAPL 94.28 Define a new C++ “Stock” class that manages a stock price, number of share and stock symbol Store data from file into vector NUM,SYMBOL,PRICE DISPLAY all data in the following format: Num_purchase, symbol , price, total(total is caculate by mutiply Num-purchase with price).Topical Information Use C++. The purpose of this project is to test your ability to use files, class design, operator overloading, and Strings or strings effectively in program design. Program Information Create a program which will read a phrase from the user and create a framed version of it for printing. For example, the phrase "hello world"would result in: ********* * hello * * world * ********* Whereas the phrase "the sky is falling"might be: *********** * the * * sky * * is * * falling * *********** Or: *********** * the * * sky * * is * * falling * *********** Or even: *********** * the * * sky * * is * * falling * *********** Depending on whether or not the user asked for left, centered, or right justification — respectively — of the phrase's words within the frame. Note how the frame exactly fits the phrase based on the longest word within. Neat, eh? The phrase "O | -+- | /-\"when centered would become:…Bank ProgramThis c++ assignment uses the same account class created in Lab #4 with a more generally useful interface. It reads commands from a bank.txt file. Your program must process the following four commands.Create account amountDeposit account amountWithdraw account amountBalance accountIn all of the above commands, account is an integer and amount is a double.The following program behavior is required –1. Valid account numbers are 1-9. This requires the program to have an array of references to Account objects.2. If the first word on any line contains a command other than the four listed above, an error message should be displayed and that line ignored.3. The create command creates a new account object with the given account number and initial balance. If an account already exists with that number an error message should be displayed and the command ignored.4. The Deposit and Withdraw commands perform the indicated operation on an existing account. If no account with that number…
- C++ OOP Create a class staff having fields: Staff_id , name, salary. Write a menu driven program for:o To accept the datao To display the datao To sort the data by nameC++ Create a class Student that contains three members: roll no, name and mark, and three functions. Write a first inputStudent() function to get data of student class. Write a second getMark() function that returns a student’s mark. Write a third display() function that displays a student’s data. In a main() function, you need to declare 40 students and get data of all students by using inputStudent() function. And also use a pointer array to keep all students by mark greater than 50 and display the searching data of each student in that pointer array (Use the access operator -> to access a pointer points to member functions of the Student class).in C++ There should be three files: header file containing the definition of class .h, file containing the class implementation should be .cpp, and the driver code (i.e., the main() function) main.cpp Create a class called Complex for performing arithmetic with complex numbers. Write a driver program to test your class. Complex numbers have the form: realPart + imaginaryPart * i where i is √−1.Use double variables to represent the private data of the class. Provide a constructor function that enables an object of this class to be initialized when it is declared. The constructor should contain default values in case no initializers are provided. Provide public member functions for each of the following: a) Addition of two Complex numbers: The real parts are added together and the imaginary parts are added together. b) Subtraction of two Complex numbers: The real part of the right operand is subtracted from the real part of the left operand and the imaginary part of the right…
- Write program in C++ Language The other solutions on chegg were incorrect! Please read carefully! Write a program that defines and tests a class called COP3014. The class resembles aclassroom. It has the following grading scheme:3 quizzes 20 points each 20%Mid term 100 points 30%Final 100 points 50%Based on the total grade of any student for the course, the letter grade of each student can becomputed as follows:Any grade of 90 or more is an A, any grade of 80 or more (but less than 90) is a B, any grade of70 or more (but less than 80) is a C, any grade of 60 or more (but less than 70) is a D, and anygrade below 60 is an F.This class needs to have some member variables. The first name, last name, the Z-number, thegrades, the total grade and final letter grade are all considered to be private member variablesof this class.The class should also have the following public member functions/procedural attributes that canbring the objects (students of the class) to life and give them some…C++ Dynamic Programs Hoskins College offers both curriculum and continuing education courses. Write a program that dynamically tracks these courses using an array of object pointers. Every course (both curriculum and continuing education) has a course id, title, room number, and number of contact hours. A curriculum course has credit hours and tuition rate. Tuition is calculated by multiplying the course's credit hours by tuition rate. A continuing education course has a flat fee (cost). Implement a show() function in every class that displays the data in the object. Part A: Create an inheritance-based collection of classes to represent these different courses. Include code in main to test your work by instantiating objects of the two derived classes. Part B: Modify your program. Remove the objects you created in main to test the classes. Modify the base class so that show() becomes a virtual class. In main, create a single array capable of holding pointers to objects of both…Write a C++ program, you will create a class called Books to hold the information about the books in a library. The information required for each book is as follows Book Title Author name Publisher Publish year Subject Book ID (identical 5 digits’ number) Implement the following getBookInfo () member function that receives a pointer to a book and fills it up with user data. User input validation is necessary. The user should be properly prompted for each field. void getBookInfo (Books *b) Implement the following printBookInfo () member function. void printBookInfo (Books *b) Your function should print the book in the following format: Book Title : Object Oriented Programming Using C++ Author : Chris M. Szalwinski Publisher : Amazon Year : 2016 Subject : Computer Science Book Id : 00034 Note: You need to add required constructors/destructors, member functions or data members/variables in your program to complete its execution. //Missing lines of codes to be completed by the student }…
- Write a c++ program Class student contains roll number, name and course as data members and Input_student and display_student as member functions. Create a class exam and publicly inherit it from student class. The derived class contains an array of marks and no_of_subjects as data members, and input_marks and display_result as member functions. Overload “c++ A FastCritter moves twice as fast as a regular critter. When asked to move by n steps, it actually moves by 2 * n steps. Implement a FastCritter class derived from Critter whose move function behaves as described. Complete the following file: fastcritter_Tester.cpp #include <iostream>using namespace std; #include "critter.h" /**A FastCritter moves twice as fast as a regular critter.*/class FastCritter:public Critter{public:void move(int steps);}; . . . int main(){FastCritter speedy;speedy.move(10);cout << speedy.get_history() << endl;cout << "Expected: [move to 20]" << endl;speedy.move(-1);cout << speedy.get_history() << endl;cout << "Expected: [move to 20, move to 18]" << endl;return 0;} Use the following file: critter.h #ifndef CRITTER_H #define CRITTER_H #include <string> #include <vector> using namespace std; /** A simulated critter. */ class Critter { public: /** Constructs a critter at position 0 with blank…Topical Information Use C++. This lab is designed to give you practice with labeled data in files. Again, classes can help ease your design woes. Program Information Write a program that transfers the contents of one file to a second file. The first file will contain an arbitrary (unknown) number of data groups. A data group will normally consist of a person's name (a string containing spaces), the person's student ID (a large integer), the person's GPA (a floating point number), and the person's gender (a character). The data in each group should be in a labeled data format. Be sure to use some kind of string library to help you with the label/value processing (as we discussed in class). (The library provided here is good but not everything you'll need. You still need functions to convert strings into integers and into floating point numbers. string to bool, string to string, and string to character conversions should be fairly easy.) You can choose the actual values to use for the…