(C Programming language, not C++ and MUST Compile)
Companies and people often buy and sell stocks. Often they buy the same stock for different prices at different times. Say one owns 1000 shares a certain stock (such as Checkpoint), one may have bought the stock in amounts of 100 shares over 10 different times with 10 different prices. We will analyze two different methods of accounting, FIFO and LIFO accounting used for determining the “cost” of a stock. This is also known as the dollar cost average basis. This information is typically calculated when a stock is sold to determine if a profit or loss was made. In our version of FIFO accounting, the price of a commodity is averaged starting with the first purchase of that item. Say we sell 250 shares of a stock, according to this method the dollar cost averaged purchase price is determined by averaging the prices on the first 250 shares bought. In our version of LIFO accounting, the price of a commodity is averaged starting with the last purchase of that item. Say we sell 250 shares of a stock, according to this method the dollar cost average purchase price is determined by averaging the prices on the last 250 shares bought. In this assignment, you will be using a queue for storing data for FIFO accounting, and a stack for LIFO accounting. Implement you queue using link list and implement your stack using a link list. Both your stack and queue should have records with the following fields: The stock Tticker symbol (a string). The Stock Name ( a string). The number of shares of a stock (an integer). The purchase price for those shares (decimal). You can assume that the first element of the structure is the security bought first, the second was bought second, etc. Your program should have the user able to enter information about various stocks, the amount of shares, and the price. The user can then enter a query about a certain stock and the cost according to the LIFO and FIFO accounting methods for a certain number of shares.
The following could be your menu:
Press 1 to enter a new stock
Press 2 to find the LIFO and FIFO dollar cost average for the number of shares sold.
If 1 is pressed, the user needs to enter the stock symbol, Stock name, the number of shares bought, and the price per share when purchased.
If 2 is pressed, the user needs to enter the stock symbol being queried and the number of shares you wish to sell.
Once that information is entered the dollar cost averaged price per share for both the LIFO method and the FIFO method should be displayed. Implement the program described above using the c programming language to meet the overall requirements described above.
Use the blow data.
Ticker:XOM
Name:Exon Mobile
Purchases in the order below.
1. 100 shares at 82.65
2. 50 sharees at 80.23
3. 200 shares at 84.50
4. 100 shares at 81.58
Ticker:D
Name:Dominion Resources Purchases in the order below.
1. 350 shares at 69.98
2. 200 shares at 70.72
3. 100 shares at 69.00
4. 180 shares at 71.90
After you enter the XOM data have the software calculate and display the dollar cost average basis for both the LIFO and FIFO methods when selling 400 shares. After you enter the D data have the software calculate and display the dollar cost average basis using both the LIFO and FIFO methods when selling 400 shares.
We need at least 10 more requests to produce the answer.
0 / 10 have requested this problem solution
The more requests, the faster the answer.
(C Programming language, not C++ and MUST Compile) Companies and people often buy and sell stocks....
Companies and people often buy and sell stocks. Often, they buy the same stock for different prices at different times. Say a person owns 1000 shares a certain stock (such as Google) he/she may have bought the stock in amounts of 100 shares over 10 different times with 10 different prices. We will analyze two different methods of accounting, FIFO and LIFO accounting used for determining the “cost” of a stock. This information is typically calculated when a stock is...
This is an additional assignment from the chapter on the Java Collections Framework. Suppose you buy 100 shares of a stock at $12 per share, then another 100 at $10 per share, then you sell 150 shares at $15. You have to pay taxes on the gain, but exactly what is the gain? In the United States, the FIFO rule holds: You first sell all shares of the first batch for a profit of $300, then 50 of the shares...
COP3337 Assignment 10 This is an additional assignment from the chapter on the Java Collections Framework. Suppose you buy 100 shares of a stock at $12 per share, then another 100 at $10 per share, then you sell 150 shares at $15. You have to pay taxes on the gain, but exactly what is the gain? In the United States, the FIFO rule holds: You first sell all shares of the first batch for a profit of $300, then 50...
5 Steel Mill began August with 55 units of iron inventory that cost $35 each. During August, the company completed the following inventory transactions: Click the icon to view the transactions.) Read the requirements ple-29 Requirement 1. Prepare a perpetual inventory record for the merchandise inventory using the FIFO inventory costing method Start by entering the beginning inventory balances. Enter the transactions in chronological order, calculating new inventory on hand balances after each transaction. Once all of the transactions have...
PROGRAMING IN C. PLEASE HELP FIX MY CODE TO FIT THE FOLLOWING CRITERIA: 1.)Read your stocks from your mystocks.txt file. You can use this information for the simulator. 2.)The stock price simulator will return the current price of the stock. The current prices is the prices of the requested ticker + a random number. 3.)We will assume that the stock price remains constant after the price check till your trade gets executed. Therefore, a buy or a sell order placed...
Demonstration Problem 5-5 Demonstration Problem 5-5 introduces accounting for inventories with multiple layers and prices. The objective here is to show how cost flow methods differ from each other. For example, does FIFO or LIFO produce a higher gross margin? We want to see how different cost flow methods affect a particular statement (e.g., what does the income statement look like under FIFO, LIFO, and weighted average?). We, demonstration Problem 5-5 use a vertical format to prepare income statements, balance...
1. At the end of 2021, Metlock Co. has accounts receivable of $756,000 and an allowance for doubtful accounts of $27,000. On January 24, 2022, it is learned that the company’s receivable from Madonna Inc. is not collectible and therefore management authorizes a write-off of $4,644. (a) Use a tabular summary to record the write-off. Enter 2021 amounts as beginning balances. (Enter negative amounts using either a negative sign preceding the number e.g. -45 or parentheses e.g. (45).) Assets =...
Requires Python to answer
A client wishes to keep track of his investment in shares. Write a program to help him manage his stock portfolio. You are to record both the shares that he is holding as well as shares that he has sold. For shares be is curreatly holding, record the following data: .a 3-character share code, share name, last purchase date, volume currently held and average purchase price (refer to description under part cii) option 2) For shares...
Accounting Methods & Estimates and Their Effects on Net Income Homework Two different companies were organized to sell gec-gaws to the public. Both companies expect this to be a widely used device with increasing Sales each year. With increased enhancements, each year, they expect the sales price per unit to increase each year. Both companies expect to sell 10,000 units, at a selling price of $2,000 each, during their first year of business. Sales are anticipated to increase by 10%...
Accounting Methods & Estimates and Their Effects on Net Income Homework Two different companies were organized to sell gee-gaws to the public. Both companies expect this to be a widely used device with increasing Sales each year. With increased enhancements, each year, they expect the sales price per unit to increase each year. Both companies expect to sell 10,000 units, at a selling price of $2,000 each, during their first year of business. Sales are anticipated to increase by 10%...