Questions
Java Programming Project 6: File I/O Purpose: To practice reading from as well as writing to...

Java Programming Project 6: File I/O

Purpose: To practice reading from as well as writing to text files with the help of Scanner class methods, and PrintStream class methods. You will also learn to implement some simple Exception Handling.

Carefully examine and follow ALL the program specifications.

Take a look at the PPT slides for Chapter 7 File I/O for examples that will help with this program.

Hotel Expense Recording Keeping:

A hotel bookkeeper enters client hotel expenses in a text file. Each line contains the following, separated by semicolons: client name, service sold (i.e., Dinner, Conference, Lodging, etc.), the sales amount, and the date.

  1. Your program should first query the user for the name of the input file and read it in. Display an error if the input file is not found (does not exist).
  2. Then the program should read the file (line by line), keep a running tally of the total amount for each kind of service,
  3. Finally display the total amount for each service category. In addition to displaying totals on the screen, the totals should also be written to an output file.
  4. Additionally your program should include some exception handling. An Exception that should be checked (and handled) would be a FileNotFoundException.

Attached (and below) is an example input file that your program will be tested with, so you will need to make sure that you program will run correctly using this file. Since this may be your first experience reading from an input file, you will likely find it easiest if you store the input file in the same folder with your Java program file so that they can easily communicate with one another. The easiest way to store this file is as a plain text file in Notepad (do not use MS word or any other sophisticated word processor or you will be processing embedded text commands, which is not at all recommended). Here is what the input file looks like:

Jason Inouye;Conference;250.00;11/10/2016

Jason Inouye;Lodging;78.95;11/10/2016

Mary Ryan;Dinner;16.95;11/10/2016

Mark Twain;Dinner;25.50;11/10/2016

Mark Twain;Spa;50.00;11/10/2016

Steven Hawking;Conference;250.00;11/10/2016

Steven Hawking;Room Service;45.00;11/11/2016

Steven Hawking;Lodging;78.95;11/11/2016

Ayrton Senna;Room Service;23.20;11/10/2016

Ayton Senna;Dinner;22.50;11/10/2016

Ayton Senna;Lodging;78.95;11/10/2016

One feature of the input file, is that it uses a semicolon (;) to delimit the tokens on each line of input, rather than whitespace. You will need to use a delimiter statement after you construct your line scanner object.

To see how to construct a line scanner object, go to Chapter 7 PowerPoint slide in the Week 13 folder. So for example, if you create an object called lineScan of type Scanner to process tokens on a given line of input, then you could call the useDelimiter method on your lineScan object, as follows:

lineScan.useDelimiter(";");

This will allow you to tokenize each input line based, not on white space delimiters, but using the semicolon as a delimiter instead.

This is what should be in your Output file after you run your program (this file will most likely be located in the same folder as your Java program).

Dinner expenses : 64.95
Lodging expenses : 236.85
Conference expenses : 500.00
Room Service expenses : 68.20
Spa expenses : 50.00

Submission Requirements:

  1. Please be sure to use appropriate prologue comments at the top of your program, Javadoc formatted comments for your methods, as well as inline comments within the body of your code (as needed).

In: Computer Science

Problem 3. Carleton agency, a VHWO, conducts two programs: medical services and community information services. It...

Problem 3. Carleton agency, a VHWO, conducts two programs: medical services and community information services. It had the following transactions during the year ended June 30, 2016:

1. Received the following contributions:

Unrestricted pledges

$800,000

Restricted cash

95,000

Building fund pledges

50,000

Endowment fund cash

1,000

2. Collected the following pledges:

Unrestricted

$450,000

Building fund

20,000

3. Received the following unrestricted cash flows from:

Theater party (net of direct costs)

$12,000

Bequests

10,000

Membership dues

8,000

Interest and dividends

5,000

4. Program expenses incurred (processed through vouchers payable):

Medical services

$60,000

Community information services

15,000

5. Services expenses incurred (processed through vouchers payable):

General administration

$150,000

Fund raising

200,000

6. Purchased fixed assets:

Fixed assets purchased with donor-restricted cash $18,000.

Carleton's policy is to release donor restrictions when assets are placed in service.

7. Depreciation of all buildings and equipment in the land, buildings, and equipment fund was allocated as follows:

Medical services program

$4,000

Community information services program

3,000

General administration

6,000

Fund raising

2,000

8. Vouchers paid: Paid vouchers payable $330,000

Instructions Record journal entries for the preceding transactions. Number your journal entries to coincide with the preceding transaction numbers. (AICPA adapted)

In: Accounting

Fixed Asset Discussion: Identify a type of company in your pathway that might purchase fixed assets...

Fixed Asset Discussion:

  1. Identify a type of company in your pathway that might purchase fixed assets (see suggestions below).
  2. List 5 fixed assets that they might purchase to run their business.
  3. Select one depreciable fixed asset. Based on research suggest what the cost, residual value and estimated life might be for that fixed asset.
  4. Using your assumptions above, calculate:
    1. Straight-line depreciation per year.
    2. Declining Balance depreciation for each of the first two years
    3. Units of Production depreciation (make assumptions about the total expected use and the first two year’s use), for each of the first two years.
  5. Suggest which depreciation method might be more appropriate and why.

Examples of sectors/industries in pathways could be:

  • AHCD: Media, Dance, Theater, Film production, Graphics design or Architecture
  • Business: Tourism/Leisure, Telecommunications, Retailers, Computers, Equipment, Food and Beverage Products, Real Estate, Technology Hardware, Toys, Commercial Services, Financial Services, any business is acceptable
  • Education: Non-Profit Services, Public Agency, Child care, Charter schools, Universities
  • Health Sciences: Health Care Services, Healthcare Products, Hospital, Household Products, Chemicals
  • IMCT: Aviation, Construction, Construction Materials, Logistics, Automotive, Mining
  • Public Safety:   Equipment providers for the industry, Public Agency, Non-Profit Services
  • STEM: Engineering, Computers. Chemicals, Energy, Energy Utilities, Technology Hardware
  • SGSHS: Healthcare Services, Non-Profit Services, Media, Public Agency

In: Accounting

A random sample of fifty si ​200-meter swims has a mean time of 3.06 minutes and...

A random sample of fifty si ​200-meter swims has a mean time of 3.06 minutes and the population standard deviation is 0.08 minutes. Construct a 95​% confidence interval for the population mean time. Interpret the results.In a random sample of 50 ​refrigerators, the mean repair cost was $136.00 and the population standard deviation is​$19.1019.10. A 90​% confidence interval for the population mean repair cost is (131.56,140.44). Change the sample size to n=100. Construct a 90% confidence interval for the population mean repair cost. Which confidence interval is​ wider? Explain.

Construct a 90% confidence interval for the population mean repair cost.

The 95​% confidence interval isA random sample of thirty-seven ​200-meter swims has a mean time of 3.591 minutes. The population standard deviation is 0.080 minutes. A 90​% confidence interval for the population mean time is (3.569,3.613). Construct a 90​% confidence interval for the population mean time using a population standard deviation of 0.03 minutes. Which confidence interval is​ wider? Explain.

The 90​% confidence interval is

The 95​% confidence interval is

You are given the sample mean and the population standard deviation. Use this information to construct the​ 90% and​ 95% confidence intervals for the population mean. Interpret the results and compare the widths of the confidence intervals. If​ convenient, use technology to construct the confidence intervals.

A random sample of 35 home theater systems has a mean price of ​$128.00. Assume the population standard deviation is ​$15.90. Find the 90% and 95% of confidence interval.

In: Statistics and Probability

Select a company in your pathway that maintains inventory. Don't use a company that someone has...

Select a company in your pathway that maintains inventory. Don't use a company that someone has already used. Please put the company's name as the subject of your post. (No posting the company name only to hold it. You must make a full post or I will delete it.)

Access a recent (less than 12 months) annual 10-K report for the company at the EDGAR filings at SEC Edgar search tool or Yahoo or Google finance. Review the report and in a minimum of three paragraphs, tell us the following:

1. When the report was filed and the time period it covers, indicating specific dates.
2. What are the company's major product lines?
3. What inventory methods do they use? (Hint: see the Notes of the financial statements)
4. List the major types of the inventory and their values.
5. Include two other items that you found interesting about the financial statements.

Examples of businesses in pathways could be:

  • AHCD: Dance, Theater, Film production, Social media, Graphics design or architecture business
  • Business: Accounting office, caterer, advertising firm, dry cleaner, restaurant, any business is acceptable
  • Education: K-12 tutoring, Child care, Charter schools
  • Health Sciences: Dr. or Dentist office, PT office, Hospital, Insurance co,
  • IMCT: Engineering Co., Aviation maintenance, Aviation distribution, Supply Chain Management
  • Public Safety: Law office, PI, Equipment providers for the industry
  • STEM: Engineering Co., Vet. Office, Computer Services co.
  • SGSHS: Psychology office, Non-profit agencies, Social Media

In: Accounting

21) The weight of a bouquet of a dozen roses has a bell-shaped distribution with mean...

21) The weight of a bouquet of a dozen roses has a bell-shaped distribution with mean 30 oz and standard deviation 2 oz. One bouquet had a z-score of -3.25. Which is correct?

a) This bouquet could be considered to be an outlier because its weight is way above average.

b) This bouquet is 3.25 standard deviations above the mean

c) This bouquet could be considered to be an outlier because its weight is way below average.

d) This bouquet is about average in weight.

e) This bouquet is 3.25 standard deviations below the mean.

22) Find the regression line for the given data. Make sure you use LinReg(a+bx) on your calculator.

x

1.2

1.4

1.6

1.8

2

y

54

53

55

54

56

a) y = 2x - 50.4

b) y = 50.4

c) y = 2.5x + 45

d)None of these

23) The demand for vegetarian sandwiches each day for eight consecutive days is given below. Find the interquartile range (IQR).

16 19   25   24   26   22   44   28

a) 55

b) 10

c) 44

d) 6.5

e) 30.5

24) The number of seats in a movie theater. Determine whether the data is from a discrete or continuous data set.

a) Discrete

b) Continuous

25) Which of the following numerical summary measures cannot be easily approximated from a box plot?

a) Median

b) IQR

c) Q1

d) Range

e) Variance

b) Continuous

In: Statistics and Probability

   7. The director of career advising at Rutgers want to use decision analysis to provide...

   7. The director of career advising at Rutgers want to use decision analysis to provide information to help students decide which degree program they should pursue. The director has set up the following payoff table for 6 of the most popular and successful degree programs at RU that shows the estimated (projected) 5-year gross income that an average student graduating with each degree for 4 future economic conditions can expect:

Economic  

Conditions

Degree Program

Recession

Average

Good

Robust

Nursing

115000

155000

190000

180000

Law

140000

175000

200000

220000

Finance

95000

150000

180000

250000

Computer Programming

120000

140000

150000

170000

Information Systems

85000

120000

150000

180000

Music and Theater

60000

80000

100000

100000

Determine the best degree program (a decision under uncertainty) in terms of the projected income, using the following decision criteria:

  • Maximax
  • Maximin
  • Equal Likelihood
  • Minimax Regret
  • Hurwicz with α = .25

If further it has been determined that the probability of each future economic condition is given by:

p(recession)=.45, p(average)=.35, p(good)=.15, p(robust)=.05.   

Use expected value to determine the best degree program (a decision under risk presuming equally likely futures) in terms of projected income. If you were the director of career advising which degree program would you recommend (in particular, do you agree with optimizing the expected payoff or some other criteria)?

In: Operations Management

Select a company in your pathway that maintains an inventory. Don't use a company that someone...

Select a company in your pathway that maintains an inventory. Don't use a company that someone has already used. Please put the company's name as the subject of your post. (No posting the company name only to hold it. You must make a full post or I will delete it.) Access a recent (less than 12 months) annual 10-K report for the company using the SEC Edgar search tool or Yahoo or Google finance. Review the report and in and in a minimum of three paragraphs, tell us the following: 1. When the report was filed and the time period it covers, indicating specific dates. 2. What are the company's major product lines? 3. What inventory methods do they use? (Hint: see the Notes of the financial statements) 4. List the major components of the inventory and their values. 5. Include two other items that you found interesting about the financial statements. Examples of businesses in pathways could be: • AHCD: Dance, Theater, Film production, Social media, Graphics design or architecture business • Business: Accounting office, caterer, advertising firm, dry cleaner, restaurant, any business is acceptable • Education: K-12 tutoring, Child care, Charter schools • Health Sciences: Dr. or Dentist office, PT office, Hospital, Insurance co, • IMCT: Engineering Co., Aviation maintenance, Aviation distribution, Supply Chain Management • Public Safety: Law office, PI, Equipment providers for the industry • STEM: Engineering Co., Vet. Office, Computer Services co. • SGSHS: Psychology office, Non-profit agencies, Social Media

In: Finance

A. According to John Maynard Keynes, the demand for money in a country is determined entirely by that nation’s central bank.

A. According to John Maynard Keynes,

  1. the demand for money in a country is determined entirely by that nation’s central bank.

  2. the supply of money in a country is determined by the overall wealth of the citizens of that country.

  3. the interest rate adjusts to balance the supply of, and demand for, money.

  4. the interest rate adjusts to balance the supply of, and demand for, goods and services.

B. While a television news reporter might state that “Today the Fed raised the federal funds rate from 1 percent to 1.25 percent,” a more precise account of the Fed’s action would be as follows:

  1. “Today the Fed told its bond traders to conduct open­market operations in such a way that the equilibrium federal funds rate would increase to 1.25 percent.”

  2. “Today the Fed raised the discount rate by a quarter of a percentage point, and this action will force the federal funds rate to rise by the same amount.”

  3. “Today the Fed took steps to increase the money supply by an amount that is sufficient to increase the federal funds rate to 1.25 percent.”

  4. “Today the Fed took a step toward expanding aggregate demand, and this was done by raising the federal funds rate to 1.25 percent.”

C. Refer to the graph above, if the current interest rate is 2 percent,

  1. there is an excess supply of money.

  2. people will sell more bonds, which drives interest rates up.

  3. as the money market moves to equilibrium, people will buy more goods.

  4. All of the above are correct.

D. Suppose that the Federal reserve is concerned about the effects of falling stock prices on the economy. What could it do?

  1. buy bonds to raise the interest rate

  2. buy bonds to lower the interest rate

  3. sell bonds to raise the interest rate

  4. sell bonds to lower the interest rate

E. The economy is in recession. Shifting the AD curve rightward by $200 billion would end the recession. Which of the following statements is correct?

1. If MPC = 0.8 and there is no crowding out, the Congress needs to increase G by $160 billion to end the recession.

2. If MPC = 0.8 and there is no crowding out, the Congress needs to increase G by $40 billion to end the recession.

3.. If MPC = 0.8 and there is crowding out, the Congress needs to increase G by a smaller amount than when there is no crowding out.

4. If MPC = 0.8 and there is crowding out, the Congress needs to increase G by the same amount than when there is no crowding out.

F. In 1986, OPEC countries increased their production of oil. This caused

  1. the price level to rise.

  2. aggregate supply to shift right.

  3. unemployment to rise.

  4. None of the above is correct.

G. Suppose the economy is in long-run equilibrium. If there is a sharp decline in government purchases combined with a significant increase in immigration of skilled workers, then in the short run,

  1. real GDP will rise and the price level might rise, fall, or stay the same. In the long-run, real GDP will rise and the price level might rise, fall, or stay the same.

  2. the price level will fall, and real GDP might rise, fall, or stay the same. In the long-run, real GDP and the price level will be unaffected.

  3. the price level will rise, and real GDP might rise, fall, or stay the same. In the long run, real GDP will rise and the price level will fall.

  4. the price level will fall, and real GDP might rise, fall, or stay the same. In the long run, real GDP will rise and the price level will fall.

H. Suppose the economy is in long-run equilibrium. In a short span of time, there is a sharp increase in the supply of labor, a major new discovery of oil, and new environmental regulations that raise the cost of electricity production. In the short run

  1. the price level will rise and real GDP will fall.

  2. the price level will fall and real GDP will rise.

  3. the price level and real GDP will both stay the same.

  4. All of the above are possible.

I. If the Fed conducts open-market sales, which of the following quantities increase(s)?

  1. interest rates, prices, and investment spending

  2. interest rates and prices, but not investment spending

  3. interest rates and investment, but not prices

  4. interest rates, but not investment or prices

J. A tax cut shifts aggregate demand (Note here we are asking for the theoretical case)

  1. by more than the amount of the tax cut.

  2. by the same amount as the tax cut.

  3. by less than the tax cut.

  4. None of the above is necessarily correct.

 

In: Economics

As the auditor of Komsu Air Limited (KAL) that manufactures and installs large commercial airconditioning systems....

As the auditor of Komsu Air Limited (KAL) that manufactures and installs large commercial airconditioning systems. KAL typically has two or three large contracts (ranging from $6 million to $10 million each) in progress at any one time. The contracts usually take up to six months to complete, although unexpected on-site difficulties can result in lengthy delays in completion (of up to 12 months). KAL finances its operations with a mixture of equity, long-term debt (secured by fixed assets) and short-term bank loans.

It is now May 2017 and your planning of the audit of KAL for the year ended 30 June 2017 is nearing completion. You have met with the management of KAL and, from those discussions and a review of the preliminary information provided by KAL, you have identified several issues that may have implications for the company’s ability to continue as a going concern. The relevant issues are as follows:

 Competition in the industry is becoming more intense, with some customers now installing their own systems.

 KAL’s bank has requested cash flow forecasts for the coming year to support the short-term loans. It has indicated that it may need to withdraw funding or restructure debt if the forecasts are not adequate. The review of work-in-progress indicates that all the contracts in progress at year end are due for completion within six months of the balance date. There are no new contracts in place for the coming year, although management has indicated that there are orders currently being negotiated. The nature of the business is such that sales will fluctuate considerably from year to year depending on the timing of one or two large contracts.

 Assets consist chiefly of plant and equipment, some of which is specialised to the industry. Debtors are significant, but recoverability is not considered an issue as the ongoing projects are with reputable customers and management is not aware of any problems. Creditor balances are at normal levels, and the company is in a positive working capital position.

 Included in provisions is a large provision for warranty for one of KAL’s jobs completed at a hotel two years ago. It appears that the air-conditioning system is still not working and the hotel is now requesting a substantial refund of the contract price.

Required:

Explain whether you believe the area of going concern should be assessed as high risk and mitigating factors for KAL’s audit for the year ended 30 June 2017. (10 marks, maximum 300 words)

In: Accounting