CASE STUDY 3 The Maslee Mart is a convenience store company operating in the state of...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
CASE STUDY 3 The Maslee Mart is a convenience store company operating in the state of Johor. The company has five stores located in several branches; Johor Bahru, Segamat, Batu Pahat, Kota Tinggi and Mersing, respectively. At the end of each year, the management of the company wants to know the performance of their company. They have decided to use a computer program to help them in analyzing the company's sales. You, as a freelance programmer have been appointed to develop the program using C language. The requirements of the program are as follow: Input: O O The program should read in sales data from a text file named "sales2014.dat" as shown in Figure 3.1. The format of the input file is as follows: The first to twelfth columns indicate the sales for each month, i.e., the first column is for the sales of January, second column is for February, third column is for March, and so forth. The last column indicates store branches. Note that sales in each cell is represented in multiple of RM 1000.00 Output: o The program should print out a report into an output file as shown in Figure 3.2. O The report should include: o The grand total of sales, i.e., over all stores throughout the year. The average sales per month. The highest sales. Print the store, month and the sales whose the highest sales. The lowest sales. Print the store, month and the sales whose the lowest sales. The total sales for each month. The months should be printed with their abbreviated names, such as, "Jan", "Feb", "Mar", and so forth. o The total sales for each store. o The list of profitable stores. A store is considered profitable if it manages to achieve minimum annual sales of RM600,000.00. O O O O o Note that all money values have to be specified as with 2 decimal points, 10 spaces in width, and right-justified. Use array (one-dimension or/and two-dimension) to store the input data from file and the output data. The program should be written in several user-defined functions for example readFile() to read data from file, grandTotalSales() to calculate the total of sales over all store throughout the year, highestSale() to find the highest sale, lowestSale() to find the lowest sales, etc. Each function must be implemented with the concept of parameter passing. Use appropriate arguments for each function. Do not use global variables. CASE STUDY 3 The Maslee Mart is a convenience store company operating in the state of Johor. The company has five stores located in several branches; Johor Bahru, Segamat, Batu Pahat, Kota Tinggi and Mersing, respectively. At the end of each year, the management of the company wants to know the performance of their company. They have decided to use a computer program to help them in analyzing the company's sales. You, as a freelance programmer have been appointed to develop the program using C language. The requirements of the program are as follow: Input: O O The program should read in sales data from a text file named "sales2014.dat" as shown in Figure 3.1. The format of the input file is as follows: The first to twelfth columns indicate the sales for each month, i.e., the first column is for the sales of January, second column is for February, third column is for March, and so forth. The last column indicates store branches. Note that sales in each cell is represented in multiple of RM 1000.00 Output: o The program should print out a report into an output file as shown in Figure 3.2. O The report should include: o The grand total of sales, i.e., over all stores throughout the year. The average sales per month. The highest sales. Print the store, month and the sales whose the highest sales. The lowest sales. Print the store, month and the sales whose the lowest sales. The total sales for each month. The months should be printed with their abbreviated names, such as, "Jan", "Feb", "Mar", and so forth. o The total sales for each store. o The list of profitable stores. A store is considered profitable if it manages to achieve minimum annual sales of RM600,000.00. O O O O o Note that all money values have to be specified as with 2 decimal points, 10 spaces in width, and right-justified. Use array (one-dimension or/and two-dimension) to store the input data from file and the output data. The program should be written in several user-defined functions for example readFile() to read data from file, grandTotalSales() to calculate the total of sales over all store throughout the year, highestSale() to find the highest sale, lowestSale() to find the lowest sales, etc. Each function must be implemented with the concept of parameter passing. Use appropriate arguments for each function. Do not use global variables.
Expert Answer:
Related Book For
Financial Accounting
ISBN: 978-0078025549
3rd edition
Authors: J. David Spiceland, Wayne Thomas, Don Herrmann
Posted Date:
Students also viewed these programming questions
-
During the course of an audit of Gaby, Inc., Emilio CPAs identified various issues. Some issues may be related to internal controls (I/C), and others may not. Select from the option list provided...
-
Design a Java class that represents a cache with a fixed size. It should support operations like add, retrieve, and remove, and it should evict the least recently used item when it reaches capacity.
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
Using Figure 11.25 and the related text, describe the features of terracing, and list the major alterations to soil and water brought about by this agricultural method. Figure 11.25
-
The U.S. Census Bureau collects information about the ages of people in the United States. Results are published in Current Population Reports. a. Identify the variable and population under...
-
(a) Identify any outliers and (b) Draw a modified box-and-whisker plot that represents the data set. Use asterisks (*) to identify outliers. 47 29 59 83 46 1 46 23 52 53 35 37 49
-
Sue Sablow is studying for her next accounting examination explain to Sue what she should know about the differences between the income statements for a manufacturing and for a merchandising company
-
The International Accounting Standards Committee (IASC) was formed in 1973. In 2001 the IASC was replaced by the International Accounting Standards Board (IASB). Required: a. What was the purpose of...
-
Pastry Place, a pastry mufacturer, has presented you with the flowing financial information for the year ending March 31, 2019 Fishey 750,000 360.000 Provision for depascuation Factory 160,000...
-
Kai is the president of Zebra Antiques. An employee, Reese Francis, is due a raise. Reeses current benefit analysis is as follows: Compute the benefit analysis assuming: 3 percent increase in pay. ...
-
. Waterway Company uses a standard cost accounting system. In 2022, the company produced28,500units. Each unit took several pounds of direct materials and 1.6 standard hours of direct labor at a...
-
Identify at least two financial regulatory bodies in the Canadian and the US market. Compare and contrast these bodies regulatory power and jurisdictions. Discuss the role of these bodies in the...
-
1. Given that the United States was founded on the principles of individual merit, hard work, and equality, how have people's perceptions of these values changed the way they see discrimination in...
-
As shown in the figure, a conducting rod with a length of 0.82 m is placed on a horizontal frictionless surface and attached to a power supply by two springs, each with a spring constant of 75 N/m....
-
Forecast the share expected returns for the coming 3 months using: Date Close March 1, 2023 123.17 April 1, 2023 127.43 May 1, 2023 118.69 June 1, 2023 121.28 July 1, 2023 117 August 1, 2023 117.33...
-
What are some common forms that biased reporting can take? 2. Consider the following headline: Virginia Christian group denied service at restaurant over safety concerns: 'Amazingly hypocritical' The...
-
References: https://www.searchenginejournal.com/social-media-marketing-strategies-hotels 10 Ideas for your hotel's social media marketing strategy in 2022 Textbook Wallace, P. (2020). Introduction to...
-
An auto-parts manufacturer is considering establishing an engineering computing center. This center will be equipped with three engineering workstations each of which would cost $25,000 and have a...
-
Describe the operating, investing, and financing sections of the statement of cash flows.
-
Explain the difference between conservative and aggressive accounting practices.
-
On January 1, 2015, Splash City issues $500,000 of 9% bonds, due in 20 years, with interest payable semiannually on June 30 and December 31 each year. Required: Assuming the market interest rate on...
-
The following transactions relate to one lease: a. On March 10, 2017, Axis Petroleum paid delinquent property taxes of $2,000 on an undeveloped lease. Assume that these taxes are recoverable out of...
-
During 2015, Prosperity Oil Company acquired the following leases: In acquiring and exploring these leases, Prosperity Oil Company incurred the following additional costs: Shooting rights, \($3,000\)...
-
Bryant Oil Corporation acquired a lease on October 15, 2015, for \($200,000\) cash. No drilling was done on the lease during the first year. Since Bryant wished to retain the lease, a delay rental of...
Study smarter with the SolutionInn App