Find Jobs
Hire Freelancers

write a C++ programming, stock traker

$10-30 USD

В роботі
Опублікований about 8 years ago

$10-30 USD

Оплачується при отриманні
objectives Practice with set and map Custom Sorting Stock Tracker You will be implementing a C++ class that will track stock prices. There are no data structures given for this assignment and it is your task to decide how to store the stock information in order to answer several queries about the data. Your class will be given the total number of shares outstanding for each stock, which will not change, and the current price of each stock which can change often. The assignment will build up to a function that asks for the top k stocks by market capitalization which is its current price multiplied by its number of shares outstanding. Registering Stocks void registerTicker(string tickerSymbol, int sharesOutstanding); bool isTicker(string tickerSymbol); int getSharesOutstanding(string tickerSymbol); Implement these functions to register a stock with a certain number of shares outstanding and answer queries on whether a symbol has been registered and the number of shares for each stock. If the number of shares is asked for a ticker that has not been registered, it should return 0. Once a stock is registered, its number of shares outstanding will not change (Note: this is not true in general, but is true for this assignment). Tracking Stock Prices void updateCurrentPrice(string tickerSymbol, double price); double getCurrentPrice(string tickerSymbol); double getMarketCap(string tickerSymbol); Implement these functions to track the price of a share for each stock. Unlike the total number of shares outstanding, the price of a stock can change often so updateCurrentPrice can be called many times on the same stock. If the price for a ticker has never been set or it was never registered, getCurrentPrice should return 0.0 for that symbol. Market capitalization is the current market value of the company and can be computed by multiplying its price by its number of shares outstanding. If the ticker has not been registered or the price was never set, return 0.0. Top k Stocks by Market Capitalization vector<string> topMarketCaps(int k); Return the ticker symbols of the k highest market cap stocks in order of their market cap. The highest market cap stock should be in index 0 of the return vector, the second highest in index 1 and so on. Ties in market cap can be broken arbitrarily for the ordering. Be very careful not to remove duplicates if using a set or map. The grader will be set up to introduce duplicates by price, shares outstanding, and market cap, but there will be no duplicates on ticker symbol. Efficiency void updateCurrentPrice(string tickerSymbol, double price); vector<string> topMarketCaps(int k); These two functions must run in O(log(n)) time where n is the number of registered stocks to earn full credit on the assignment. The runtime for topMarketCaps can also depend linearly on k making its runtime O(k*log(n)). Each of these functions will be called repeatedly to check the runtime.
ID проекту: 9888272

Про проект

3 пропозицій(-ї)
Дистанційний проект
Активність 8 yrs ago

Хочете заробити?

Переваги подання заявок на Freelancer

Вкажіть свій бюджет та терміни
Отримайте гроші за свою роботу
Опишіть свою пропозицію
Реєстрація та подання заявок у проекти є безкоштовними
3 фрілансерів(-и) готові виконати цю роботу у середньому за $38 USD
Аватарка користувача
Hello....it seems like two maps are enough for this task. I can do it... I have 22 years LOVING c++.... I should be the best optiong for you. BEst regards!
$30 USD за 2 дні(-в)
5,0 (159 відгуки(-ів))
7,5
7,5
Аватарка користувача
Hi, I have read the requirements and I would like to do this project if given the opportunity. I am a computer science practitioner and having the "C++ and Algorithms Certification Badge" in my profile gives me confidence and assurance that I can deliver you the project as required. Let me know if you are interested so I can start. Thanks.
$30 USD за 1 день
5,0 (649 відгуки(-ів))
7,3
7,3
Аватарка користувача
Hello. How are u. I saw your description and attached files. I understood it and can do it well. I have done several project like this. I'm an expert in Data Structures and Algorithms. And I know Java ,C/C++,C# and Python well. I'm interested this project. I want to discuss with you about this project. If it's possible,please contact me and explain more detail. I wait your good reply. Bye.
$54 USD за 1 день
4,2 (9 відгуки(-ів))
3,1
3,1

Про клієнта

Прапор UNITED STATES
buffalo, United States
4,4
4
Спосіб оплати верифіковано
На сайті з лют. 19, 2016

Верифікація клієнта

Дякуємо! Ми надіслали на вашу електронну пошту посилання для отримання безкоштовного кредиту.
Під час надсилання електронного листа сталася помилка. Будь ласка, спробуйте ще раз.
Зареєстрованих користувачів Загальна кількість опублікованих робіт
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Завантажуємо для перегляду
Дозвіл на визначення геолокації надано.
Ваш сеанс входу закінчився, і сеанс було закрито. Будь ласка, увійдіть знову.