Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help me, I need meke code for this files ( project2.cpp, start.cpp, activity.cpp ) Project 2 Stock Market Program CSCI 111 Programming and Algorithms

please help me, I need meke code for this files (project2.cpp, start.cpp, activity.cpp)

image text in transcribed

image text in transcribed

image text in transcribed

Project 2 Stock Market Program CSCI 111 Programming and Algorithms I Only a maximum of 50% of the points are possible if your program does not completely pass the turnin test(s). NEW CONCEPTS: Successful completion of this lab incorporates the following new concepts None Your project should consist of the following 7 files: project2.cpp, start.cpp, activity.cpp, start.h, activity.h accounts.txt, and the Makefile The contents of the Makefile is: project2: project2.o start.o activity.o g++ -std-++11-o project2 start.o project2.o activity.o project2.o: project2.cpp start.o: start.cpp activity.o: activity.cpp rm project2.o start.o activity.o g++ -std-c++11-o project2.o -c project2.cpp gt+ -std-c++11-o start.o -c start.cpp gt+ -std-c++11 -o activity.o -c activity.cpp The file accounts.txt has: Lou Diamond Philips,lou,5 Abe Lincoln,abe,50 The file start.h should declare the following: struct User { string account holder; string username float balance; vector verify(string username, bool &access); The file activity.h should declare the following: vector login(string username, vector, bool &access); vector GetBalance(string username, vector BuyStock(string username, vector SellStock(string username, vector); void Quit(bool &access); Task list 1. Create a source code file named project2.cpp 2. The program starts by prompting the user for his/her username. If the user is already configured in accounts.txt, the user is authenticated 3. The program should then displays the menu offering the user options to either display his/her portfolio balance, buy stock, sell stock, or quit 4. Refer to the header files above as a guide to help you develop your code and ensure a successful turnin submission 5. It is NOT required to update the accounts.txt file upon terminating the program. 6. Refer to the expected output listing below 7. Submit your start.cpp and activity.cpp file on https://turnin.ecst.csuchico.edu/ and get a successful message GRADING To achieve a maximum score, students will need to clearly prove that they completed the goal Points lost for incompleteness, sloppiness, lateness, or failure to follow instructions. Refer to syllabus for late policy SAMPLE OUTPUT /user/faculty/ Welcome to the Stock Market. Enter your username lincoln Please create an account. /user/faculty/jraigoza/CSCI111/Labs/project2 $ ./project2 Welcome to the Stock Market. Enter your username. abe Login Successful! What would you like us to help you with? Please choose 1, 2, 3, or 4 1) Get portfolio balance. 2) Buy Stock. 3) Sell Stock. 4) Quit /CSCI111/Labs/project2 s ./project2 The portfolio balance for Abe Lincoln is $50 What would you like us to help you with? Please choose 1, 2, 3, or 4 1) Get portfolio balance. 2) Buy Stock 3) Sell Stock. 4) Quit. 2 How many shares would you like to buy? 3 What is the price per share? 5.50 The portfolio balance for Abe Lincoln is $33.5 What would you like us to help you with? Please choose 1, 2, 3, or 4 1) Get portfolio balance. 2) Buy Stock. 3) Sell Stock. 4) Quit The portfolio balance for Abe Lincoln is $33.5 What would you like us to help you with? Please choose 1, 2, 3, or 4 1) Get portfolio balance. 2) Buy Stock. 3) Sel1 Stock. 4) Quit 3 How many shares would you like to sell? What is the price per share? 1.25 The portfolio balance for Abe Lincoln is $43.5 What would you like us to help you with? Please choose 1, 2, 3, or 4 1) Get portfolio balance. 2) Buy Stock. 3) Sell Stock. 4) Quit. 9 Incorrect response. Try Again What would you like us to help you with? Please choose 1, 2, 3, or 4 1) Get portfolio balance. 2) Buy Stock. 3) Sell Stock. 4) Quit. Logout Successful! /user/faculty /CSCI111/Labs/project2$ Project 2 Stock Market Program CSCI 111 Programming and Algorithms I Only a maximum of 50% of the points are possible if your program does not completely pass the turnin test(s). NEW CONCEPTS: Successful completion of this lab incorporates the following new concepts None Your project should consist of the following 7 files: project2.cpp, start.cpp, activity.cpp, start.h, activity.h accounts.txt, and the Makefile The contents of the Makefile is: project2: project2.o start.o activity.o g++ -std-++11-o project2 start.o project2.o activity.o project2.o: project2.cpp start.o: start.cpp activity.o: activity.cpp rm project2.o start.o activity.o g++ -std-c++11-o project2.o -c project2.cpp gt+ -std-c++11-o start.o -c start.cpp gt+ -std-c++11 -o activity.o -c activity.cpp The file accounts.txt has: Lou Diamond Philips,lou,5 Abe Lincoln,abe,50 The file start.h should declare the following: struct User { string account holder; string username float balance; vector verify(string username, bool &access); The file activity.h should declare the following: vector login(string username, vector, bool &access); vector GetBalance(string username, vector BuyStock(string username, vector SellStock(string username, vector); void Quit(bool &access); Task list 1. Create a source code file named project2.cpp 2. The program starts by prompting the user for his/her username. If the user is already configured in accounts.txt, the user is authenticated 3. The program should then displays the menu offering the user options to either display his/her portfolio balance, buy stock, sell stock, or quit 4. Refer to the header files above as a guide to help you develop your code and ensure a successful turnin submission 5. It is NOT required to update the accounts.txt file upon terminating the program. 6. Refer to the expected output listing below 7. Submit your start.cpp and activity.cpp file on https://turnin.ecst.csuchico.edu/ and get a successful message GRADING To achieve a maximum score, students will need to clearly prove that they completed the goal Points lost for incompleteness, sloppiness, lateness, or failure to follow instructions. Refer to syllabus for late policy SAMPLE OUTPUT /user/faculty/ Welcome to the Stock Market. Enter your username lincoln Please create an account. /user/faculty/jraigoza/CSCI111/Labs/project2 $ ./project2 Welcome to the Stock Market. Enter your username. abe Login Successful! What would you like us to help you with? Please choose 1, 2, 3, or 4 1) Get portfolio balance. 2) Buy Stock. 3) Sell Stock. 4) Quit /CSCI111/Labs/project2 s ./project2 The portfolio balance for Abe Lincoln is $50 What would you like us to help you with? Please choose 1, 2, 3, or 4 1) Get portfolio balance. 2) Buy Stock 3) Sell Stock. 4) Quit. 2 How many shares would you like to buy? 3 What is the price per share? 5.50 The portfolio balance for Abe Lincoln is $33.5 What would you like us to help you with? Please choose 1, 2, 3, or 4 1) Get portfolio balance. 2) Buy Stock. 3) Sell Stock. 4) Quit The portfolio balance for Abe Lincoln is $33.5 What would you like us to help you with? Please choose 1, 2, 3, or 4 1) Get portfolio balance. 2) Buy Stock. 3) Sel1 Stock. 4) Quit 3 How many shares would you like to sell? What is the price per share? 1.25 The portfolio balance for Abe Lincoln is $43.5 What would you like us to help you with? Please choose 1, 2, 3, or 4 1) Get portfolio balance. 2) Buy Stock. 3) Sell Stock. 4) Quit. 9 Incorrect response. Try Again What would you like us to help you with? Please choose 1, 2, 3, or 4 1) Get portfolio balance. 2) Buy Stock. 3) Sell Stock. 4) Quit. Logout Successful! /user/faculty /CSCI111/Labs/project2$

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MySQL/PHP Database Applications

Authors: Jay Greenspan, Brad Bulger

1st Edition

ISBN: 978-0764535376

More Books

Students also viewed these Databases questions

Question

Does it exceed two pages in length?

Answered: 1 week ago

Question

Does it avoid typos and grammatical errors?

Answered: 1 week ago