Questions
"You work for a digital marketing company that has been approached by a leading company (identify...

"You work for a digital marketing company that has been approached by a leading company (identify company and sector -Hospitality) in South Africa. The company wants to improve its social media and digital marketing strategy they are using, how the position and strategies limit their current capabilities, the options available to them. Identify key factors that would help that company to develop their strategy and write a report for their Board of Executives. Identify their current position and strategies and the main recommendations for an enhanced social and digital marketing strategy.”

Report: Guide framework to your report

A report differs from an essay in that the Executive Summary is the introduction and conclusion in one.

|-------- Why something was done and why it is important

|-------- Purpose of the report (problem solving, feasibility, etc.).

|-------- Main findings and important recommendations.

The introduction and conclusion mentioned in the discussion section below are equivalent to the first and last stages of the main body of the essay.

Discussion Identify problem, position, possibilities, proposal Introduction

|-------- Background to the problem in detail. Review of pertinent issues from the literature. Proof and

|-------- Analysis of target situation and development other related factors. How many of claims sections are needed to interpret the situation? Conclusion &

|-------- What does this mean in light of recommendations review, corporate &/or industry concerns, public reaction, etc. What needs to be done?

Appendices Information (charts, statistics, and diagrams) that are too long for including in the discussion. Useful to present, but not directly relevant to the argument. Avoid using more than 2 or 3 pages of appendices if possible (NOTE: they are no part of the word count).

In an essay, theory & research interprets and informs practice, whereas in a report, practice primarily reflects and informs theory

In: Operations Management

Project 1: Cloud computing has become a viable and competitive option to the client/server networking model...

Project 1: Cloud computing has become a viable and competitive option to the client/server networking model due to its lower cost, scalability, and agility. A local business in your town has asked you to develop a full plan, an analysis to determine the requirement and a design to specify the input, output, and processing prerequisites. Since you are a knowledgeable systems analyst, you have decided to take the job. You understand all the benefits that come along with cloud computing. To assure a functional development life cycle, you have also decided to point out any negative issues with cloud computing such as security, untested new technologies, and training requirement. You are aware that it should take no more than seven weeks to complete the first three phases of SDLC.

Regardless of your topic, you must complete the first three phases of the system development life cycle (SDLC) process: 1. Analysis of the business case 2. Systems analysis a. Requirements modeling b. Data and procedures modeling c. Object modeling 3. Systems design a. Input design b. Output design c. User interface

Software required to complete the project include MS Word, MS Excel, PowerPoint, Visio (or similar package), MS Project, and a statistical package. You may use trial versions of MS Project and Vizio. When using Visio, MS Project, or similar software, ensure that you publish any work as either an image file (.jpeg, .png, etc.) or a pdf before incorporating it into your course project. This is to ensure that your instructor can view/grade your project.

In: Computer Science

For this assignment you will write a program with multiple functions that will generate and save...

For this assignment you will write a program with multiple functions that will generate and save between 100 and 10,000 (inclusive) "Shakespearian" insults. The program InsultsNetID.py is supplied as a starting point and it contains some tests that you must pass. The program loads words from three separate files: word1.txt, word2.txt and word3.txt. Each file contains 50 words or phrases. An insult is generated by choosing one word or phrase from each of the three lists of words at random, adding "Thou " to the beginning and "!" to the end. One such random insult would be:

    Thou artless bat-fowling barnacle!

With this many words, you could generate 50 * 50 * 50, or 125,000 possible unique insults - more than enough for anyone! Your program does not have to generate more than 10,000 unique insults and will not generate less than 100 of them for saving to a file. Your program will need to generate unique insults (no two the same) and they must be in alphabetical order before being saved in a text file. You should use Python's built in list searching and sorting functionality.

If your program is working properly it should generate an output like SampleOutput.txt. The actual insults will be different. And a file called "Insults.txt" containing all the insults will also have been created. The file will contain the user specified number of unique insults in alphabetical order. The user should be able to supply any number of insults between 100 and 10,000. Input of this number should be completely robust. If he enters something non-numeric or outside the legal range, he should be continuously re-prompted to enter a legal value.

In: Computer Science

Microsoft in 2005 As their 2005 fiscal year came to a close, Bill Gates and Steve...

Microsoft in 2005

As their 2005 fiscal year came to a close, Bill Gates and Steve Ballmer could reflect on the last year as well as the previous five years—with mixed emotions. Microsoft had slowed down after two decades of spectacular growth in revenues, profits, and stock price (see Exhibits 1, 2, and 3). Although Microsoft remained one of the most valuable and profitable companies in the world, its two core products, Windows and Office, had been experiencing anemic growth in revenues and profits. Moreover, competing software, such as the Linux operating system, and the rising popularity of search engines like Google, were posing new threats to Microsoft’s franchise.

On the positive side, Microsoft had the strongest balance sheet of any company in the world. Management was committed to aggressive reinforcement of its core businesses, including significant investments in new operating systems and Web services, as well as ongoing investments in new businesses, ranging from Xbox to Business Solutions. Perhaps most importantly, Microsoft had settled many of its public and private lawsuits on reasonably favorable terms by 2005 (see Exhibit 4).

One of the most daunting challenges was how to reposition Microsoft for modern times. When Gates started the company in 1975, he proclaimed that the mission of Microsoft was “to place a PC running Microsoft software on every desk and in every home.” When Gates reflected on Microsoft strategy with the casewriters in the mid-1990s, he further articulated this view:

We look for opportunities with network externalities—where there are advantages to the vast majority of consumers to share a common standard. We look for businesses where we can garner large market shares, not just 30%–35%. But at the same time, we are not a software conglomerate. The key to our business is building annuities, by tapping into the broad revenue streams that will rely on our software expertise.1[A1]

In 2005, 30 years after Microsoft was founded, the company had a new vision statement: to be “the worldwide leader in software, services and solutions that help people and businesses realize their full potential.” Gates remained the company visionary as well as its chairman and chief software architect. However, it was CEO Ballmer, Gates’s friend from his freshman days at Harvard, who was now leading the charge. While Ballmer was forcefully driving the company forward, the big question remained: Would these efforts allow Microsoft to repeat its previous spectacular successes, or would the future belong to a new generation of leaders?[A2]

The Early Microsoft Years (1975–1990)

Gates and his high school friend, Paul Allen, founded Microsoft in 1975, and the company’s first product was a condensed version of the BASIC programming language for the first personal computer (PC). Over the next few years, Microsoft developed numerous versions of other programming languages, becoming the leading distributor of software development tools. But Microsoft’s big break came in 1980, when IBM asked Gates to provide the operating system (OS) for its new PC. Rather than develop an OS from scratch, Gates bought an existing OS from a local programmer for $50,000 and tailored his new product, called MS-DOS, to work exclusively with Intel microprocessors—the “brains” of the IBM PC. By 1984, MS-DOS had achieved an 85% market share, pushing Microsoft sales over $100 million. When Gates took the company public in 1986, the stock price tripled within a year, making Gates a billionaire at the age of 31.

During the 1980s, Microsoft was already trying to expand beyond MS-DOS. As early as 1981, Microsoft began work on a graphical user interface (GUI) called Windows, shipping version 1.0 in 1985. At the same time, Microsoft worked with IBM to develop a totally new OS called OS/2. The first “killer apps” in the software industry—applications that everyone wanted—came from two of the larger independent software vendors (ISVs), Lotus and WordPerfect. Microsoft was originally seen as an imitator with second-rate products. Early releases were especially derided. Industry pundits joked about never buying a Microsoft product called “1.0.”

Ironically, Microsoft’s greatest success in the 1980s outside of its OS came from recognizing the potential of the Apple Macintosh and choosing to write applications for the Apple OS. While major ISVs largely ignored the Mac, Microsoft became the dominant supplier of Macintosh word processing and spreadsheet software. Microsoft’s familiarity with developing applications for the Macintosh helped it develop Windows, which used a Mac-like GUI that took the market by storm.

Application Software

Application software had a very different business model from that of OSes. While OSes were sold mainly through hardware OEMs, applications were sold through a myriad of channels, including computer companies, corporate site licenses, various retail channels, and after the mid- 1990s the Internet. The key for successful OS vendors was to build close relationships with ISVs to produce as many applications as possible on their OS. Though ISVs did not have access to the proprietary source code for the Microsoft OS, they did have access to “hooks,” called application program interfaces (APIs), by which they could take advantage of various OS features. Successful ISVs, in turn, competed on software features, customer service, shelf space/availability, and price. Since 1990, most PC application programs, which previously sold for hundreds of dollars, had by 2005 dropped to an average of less than $40.

Until the advent of Windows, customers would typically choose a software application and then stick with it. Training workers to use a new spreadsheet or word processor once cost up to five times as much as the program itself. For productivity application vendors, such as Lotus and WordPerfect, their large customer base and high switching costs led to very profitable operations. Over the 1990s, however, Lotus, WordPerfect, Borland, and others found their businesses under pressure. First, the cost of producing a major software program grew from a few hundred thousand dollars to more than

$10 million. Second, by providing standard interfaces and file formats, Windows reduced customers’ switching costs from five times to roughly twice the cost of the application. And third, after Windows took off, Microsoft itself became the world’s largest PC application vendor.

Microsoft’s success in PC applications began in the late 1980s when it pursued a new paradigm. To induce customers to switch from their favorite applications, such as WordPerfect and Lotus 1-2-3, Microsoft was the first to offer a bundle, or suite, of applications at a discounted price. Microsoft also began offering “competitive upgrades,” a sales program whereby Lotus 1-2-3 or WordPerfect customers could switch to Microsoft for a significantly discounted price.7 Part of Microsoft’s success with Windows applications was the result of competitors’ mistakes. While Lotus and WordPerfect matched Microsoft’s competitive upgrade pricing, they were initially reluctant to write for Windows and even slower to create their own bundles. As a result, Word and Excel were the best products on the Windows platform, and by the mid-1990s, Excel was outselling Lotus by 2 to 1 and Word soon dominated WordPerfect.8 Furthermore, as competitors played catch-up by increasing their Windows development efforts, they furthered the success of Microsoft’s Windows operating system. By 1995, many ISVs, except for Microsoft, had completely abandoned Macintosh development.

Microsoft’s stand-alone products ranged from Money (financial management) and Project (project management) to Flight Simulator (a popular computer game). However, specialized ISVs were able to dominate most of the niche application markets. For example, Intuit was the dominant provider of financial management and tax software, Adobe’s PageMaker was preeminent in desktop publishing, and Autodesk’s AutoCAD was the lead vendor in computer-aided design (CAD).

Applications software accounted for about one-third of Microsoft’s total sales in 2005, after peaking at around 60% in the mid-1990s. Microsoft had captured 90% of the market for productivity software applications in 1995. Its market share then rose to around 95% by 1998, with Corel’s WordPerfect Suite and IBM’s Lotus Suite carving up the remaining scraps. Yet despite Microsoft’s great success, application revenues were under pressure. Revenue from stand-alone versions of Word, Excel, and PowerPoint had been in a steady decline since around 1995 as the Office Suite gradually absorbed each of these individual markets. Microsoft acknowledged that this trend exerted a steady downward pressure on prices because Office sold for less than the sum of the individual programs. Second, upgrades (rather than new sales) were taking a larger share of revenue, and upgrades had lower margins than new products.9 Moreover, industry wisdom held that 80% of customers used less than 20% of the features.

USE THE ABOVE SCENARIO TO ANSWER THE FOLLOWING QUESTIONS

How did Microsoft use bundling to price discriminate? Use specific cited examples. How did Microsoft build revenues so fast? Be specific in your details. What are three big threats to Microsoft's success? Be specific and explain the details and impacts of each threat.

In: Operations Management

Read the scenario and answer the following questions: Dr. Yates is a Family Practitioner who has...

Read the scenario and answer the following questions:

Dr. Yates is a Family Practitioner who has a thriving suburban practice. As one might expect, he has a crowded waiting room. On Tuesday, he usually lunches with a colleague at the hospital and then returns to his office to see patients. These lunches cause him to run late getting back to his office about 1/2 the time. When that happens, his patients must wait a bit longer than normal. But, in any event, he rarely manages to see his patients on time. On a Tuesday in February, he was running unusually late. Lunch had taken a long time and he was tired. By 4:30 he was seeing patients scheduled for 3:30. One of these patients was Donald Truett, an economics professor at the local university. This was Dr. Truett's first visit. He was new to the area, wanted to find Family Practitioner and to have a recently sustained running injury checked. When Dr. Yates entered the cubicle in which Dr. Truett was waiting, he noticed Dr. Truett glance at his watch. Dr. Yates promptly introduced himself. "Hello, Don, I'm Dr. Yates. I'm glad to meet you. What seems to be the problem?" During the course of the exam, Dr. Truett said little, even though Dr. Yates sought to engage him in conversation. Fortunately, Dr. Truett's injury was minor. Dr. Yates told him what to do, asked if he had any questions, and then departed. Dr. Yates thought nothing more of the matter. Two days later, Dr. Yates' wife asked if he had treated a colleague of hers, Donald Truett. "You know, Ted, he didn't care much for you. Said you were rude, saw him an hour late, and didn't offer a word of explanation or apology. Don also didn't like your introducing yourself as 'Doctor' while you called him 'Don'. You might have treated him better. He's a friend, you know." Dr. Yates felt himself getting angry. "Are you joking? I gave him good care, tried to be pleasant, and the sullen SOB sat there without saying a word, and then ran off to bad mouth me to you. I got into medicine to help people. I've serious things to think about. I'm surrounded by sickness and death, and then I have to come home to listen to this chicken shit. In the future, spare me you referrals." His wife flushed. "Ted, stop being so pompous. Just because you're a doctor doesn't mean you're exempted from good manners. Have you ever thought about how you treat people? Why I'm surprised you don't make me call you 'Dr. Yates'. How do you think your nurses feel when you call them 'sweetie' or by their first names while you're expecting them to always call you 'doctor'. Yours is an overly righteous profession." Although angry, Dr. Yates saw the conversation was not going to improve. He promised to give the matter some thought.

1. Is there a different standard of etiquette for the powerful (Dr. Yates in this case) and everyone else? Is this morally correct?

2. To what extent are power differentials necessary for medical practice? Power differential in this case means Dr. Yates is given more power than his staff.

3. Does differential status improve patient care? Is it helpful for certain healthcare providers to be given more power?

4. How should one address other medical colleagues and patients?

5. What are the implications of this case for you if you choose a profession in healthcare?

In: Nursing

PARAMETERS FOR BASELINE CASE The following numbers are estimates for the upcoming year for a manufacturing...

PARAMETERS FOR BASELINE CASE
The following numbers are estimates for the upcoming year for a manufacturing company.
Since the company is effective at implementing a JIT inventory system, assume there is
no beginning or ending inventory.
No. of units sold 36,000
Selling price per unit $243.00
                           Fixed Expenses Variable Expenses         (per unit sold
Production costs:
Direct materials $18.23
Direct labor 36.45
Factory overhead $2,187,000 24.30
Marketing expenses:
Sales salaries and commissions 546,750 7.60
Advertising 364,500
Miscellaneous mktg. expenses 109,350
Administration expenses:
Office salaries 729,000
Supplies 106,313 1.50
Miscellaneous admin. expenses 72,900              
     TOTAL EXPENSES $4,115,813 $88.08

1. Make CVP Calculations for the Baseline Case

  1. Prepare a contribution margin income statement (also called a variable-costing income statement) for the manufacturing company for the upcoming year. Examples of contribution income statements are on page 79, Exhibit 3-1 of the Datar and Rajan textbook and in the Chapter 3 (Datar and Rajan) course notes. Create this statement below the baseline case parameters in the Excel file you download. Key in proper headings.

Check figure: Operating profit (operating income) of $1,461,307.

  1. Compute the company’s contribution margin per unit and contribution margin percentage for the upcoming year. The contribution margin percentage is calculated as contribution margin per unit / selling price per unit or as total contribution margin / total revenue. Make these calculations below your income statement. Clearly label these calculations.
  2. Calculate the company’s breakeven point in units for the upcoming year. Make this calculation below your contribution margin calculations. Use Excel’s “round” function to round up to the nearest whole number. To do this, move your curser to the cell beside the decimal number and key in the following formula: =ROUNDUP(cell reference,0). The italicized cell reference means you need to key in the cell where the decimal number is located (e.g., F12). The number 0 means zero decimal places. Clearly label this calculation.
  3. Calculate the company’s breakeven point in sales dollars for the upcoming year. Make this calculation below your breakeven calculation in units and use the company’s contribution margin percentage to make this calculation. Clearly label this calculation.

. 2. Complete Four Scenarios (What-if Analyses)

You want to determine whether the following four suggestions (i.e., e, f, g, h) would improve the company’s performance. Determine the effects of each suggestion on operating income, contribution margin per unit, contribution margin percentage, breakeven point in units, and breakeven point in sales dollars. Calculate the effects of each suggestion independently of the other suggestions. In other words, use the original baseline case data and make the first change (e); use the original baseline case data and make the second change (f); and so on. However, do not overwrite the original baseline case.

  1. Put all personnel on commission. This action would affect the sales salaries and commissions expense by eliminating the fixed portion and by increasing the variable portion by $8.10 per unit. Sales would increase by 4,500 units.
  2. Redesign the package for the product. This would decrease the variable direct materials cost by $0.45 per unit but would increase the fixed factory overhead by $157,500.
  3. Launch a new advertising campaign. This would increase fixed advertising expense by $450,000 but would increase sales volume by 4,300 units.
  4. Reduce the selling price of the product by $16.20 per unit. This would increase sales volume by 3,500 units.
  5. Write a memo, explaining why each suggestion should or should not be accepted. Create your memo in Word, not Excel. Use proper memo format. Word has a memo template (FILE | NEW | type in ‘memo’ in the ‘search for online templates’ box).

In: Accounting

Question 1 The IRS is reevaluating the asset life categories used for ACRS depreciation. The trucks...

Question 1

The IRS is reevaluating the asset life categories used for ACRS depreciation. The trucks that JK Industries use are currently classified by the IRS as having an asset life of 7 years. Because these trucks actually last for 10 years, the firm’s managers would prefer the IRS to reclassify them as 10-year assets so the firm can keep them longer, spread the cost of depreciation over more years and hence increase earnings. (True, False, Uncertain and explain your response)

Question 2

If a firm uses the Discounted Payback rule, it will never accept a negative NPV project. (True, False, Uncertain and explain your response)

Question 3

Managers’ desire for job security and firm growth conflict with maximizing value for shareholders. (True, False, Uncertain and explain your response)

Question 4

It is often stated that anyone with a pencil can calculate financial ratios, but it takes a brain to interpret them. What kinds of things should the analyst keep in mind when evaluating the financial statements of a given firm?

Question 5

When risk averse investors choose portfolios and assets to include in them, volatility is not the way they should measure risk. (True, False, Uncertain and explain your response)

Question 6

Rau Inc. has 7.0 percent coupon bonds on the market with 9 years to maturity. The bonds make semi-annual payments and currently sell for 80 percent of par. What is the YTM?

You will upload an Excel spreadsheet that shows all of your work and the solution.

Question 7

JJ Enterprises is considering the purchase of a new machine that will produce thumb drives. The new machine will require an initial investment of $100,000 and has an economic life of five years and will be fully depreciated by the straight line method. The machine will produce 15,000 thumb drives per year with each costing $2.00 to make. Each will be sold at $4.50. Assume JJ Enterprises uses a discount rate of 14 percent and has a tax rate of 34 percent. What is the NPV of the project and should JJ Enterprises make the purchase.

You will upload an Excel spreadsheet that shows all of your work and the solution.

Question 8

You are building a pipeline which will generate its first annual cash flow of $2m exactly 5 years from today. As it ages, the volume it transports, and hence the cash flows it creates, will decline by 3% per year. Exactly 27 years from today, this pipeline will be scrapped, and the Environmental Protection Agency will require you to spend $50m then to dismantle it. The pipeline’s OCC is 9%. What’s the lowest price that you would consider selling it for?

Question 9

The returns on QRC stock and an investor’s portfolio over three years are given in the table below.

1.     Based on this data, compute the volatility of the portfolio and briefly describe how to interpret it.

2.     Based on this data, calculate the correlation between QRC and the portfolio, and briefly describe what it means. Show your work.

3.     Suppose the portfolio represents the portfolio of all wealth. What is QRC’s market beta?

Year

QRC

Portfolio

1

5.0%

19.0%

2

-3.0%

14.0%

3   

13.0%

9.0%



You will upload a Word Document that shows all of your work and the solution.

Question 10

What is the price of a T-Bond with exactly 24.5 years to maturity and coupons with rate 5.875% paid semi-annually? Its yield is 6.5% BEY (Bond Equivalent Yield is semi-annually compounded).

You will upload a Word Document that shows all of your work and the solution.

Please answer all questions and show excel files workings with formulas for those that require. Thank you.

In: Accounting

Assignment Description This assignment focuses on programming basics; expressions, variables, constants, methods, selection and loops. Danny...

Assignment Description

This assignment focuses on programming basics; expressions, variables, constants, methods, selection and loops.

Danny runs an ice cream shop in the inner suburbs of Melbourne. Due to the growing number of customers, Danny has decided to take on extra casual employees. In order to manage payroll for his employees, Danny has decided to develop an employee payroll management system. Details of each employee to be maintained in the system will include; employee id, name, gender (M or F), phone number, hours worked, pay per hour, gross pay, net pay, and income tax payable.

The gross pay is calculated as the number of hours worked multiplied by pay per hour, while the net pay is calculated as the difference between gross pay and income tax payable of which income tax payable is calculated by multiplying gross pay by an income tax rate of 30%. Any hours over forty (40) is paid as an overtime hour at the rate of (2.5) times the base hourly rate.

For example, an employee who has worked a total of 45 hours with an hourly rate of $20 will have;

Regular pay=40*$20=$800

Overtime pay=5 * $20 * 2.5 = $250

Gross pay=$800 + $250 = $1,050

Income tax payable=$1050 * 30%=$315

Net pay=$1050-$315=$735

Task Requirements

Imagine you have been hired to develop this system. Familiarise yourself with the problem description and write a python program named payroll.py with the following functions:

  1. Create a main () as a driver function in your payroll progam. Within the main (), you will declare all the required variables, and invoke the other methods described in the next step as required for calculations and displaying the program output.

  1. Create additional functions in your payroll program for calculations as follows:
    1. Function to calculate the overtime hours
    2. Function to calculate the gross pay
    3. Function to calculate the income tax payable and
    4. Function to calculate the net pay

These functions needs to be invoked in correct order within your driver function main (), so that when your program executes, it should be able to produce an output as an employee’s pay slip like the example below.

Submission requirements:

  1. Your assignment should include the following in the .ZIP archive:
  • A Word report with sections containing:
    1. An overview of the problem description of the assignment
    2. Pseudocode as an algorithm for the program
    3. Screen shot/capture of the program output
    4. Statement of completion
    5. Acknowledgment of any help taken for assignment completion    
  • Python file (payroll.py) that can be executed by your tutor

  1. Instructions for archiving and submitting your files:
  • Create a folder and name it with your student ID (MITnnnnnn, where nnnnnn are digits of your student number)
    • Copy your Word document and the python (payroll.py) files into that folder.
    • Zip the folder.
      1. Right-click on the folder
      2. In the pop-up menu select Send-to, Compressed (zipped)Folder
  • Then submit this zipped folder in Moodle submission link

Marking criteria:

Program Demonstration: Students must demonstrate their program in week8 (lab time) to the tutor, and are expected to explain their implementation. Marks will be deducted (50% -maximum) for failing to do demonstration or poor explanation.

Description of criteria

Marks

Assignment report

Overview

0.5

Pseudocode

1

Statement of completion and acknowledgement

1

Python implementation

Comments describing the program, methods, author and date

1.5

Design of main function is correctly implemented

4

Design of overtime function is correctly implemented

2

Design gross pay function is correctly implemented

2

Design of income tax payable function is correctly implemented

2

Design of net pay function is correctly implemented

2

Program runs and prints the correct output

4

Total

20

In: Computer Science

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

The vi text editor can be a bit challenging to use at first, but once you...

The vi text editor can be a bit challenging to use at first, but once you have familiarized yourself with how it works you will find it an efficient way to create and edit text files in Linux, and UNIX as well. The key thing to remember is that vi has two operational modes: insert mode and command mode. In insert mode, everything you type is entered into your file. You can use the backspace, delete and the arrow keys. You must press Enter at the end of each line. In command mode, everything you type is processed as a command. Most commands are single-letter commands, and some will accept a number before the command to indicate how many times you wish the command to be performed. You can use also specialized cursor movement commands (forward a page, back a page, go to a specific line, etc.) while in command mode. Creating and Saving a File 1. In this part of the lab, you will copy out one of William Shakespeare’s sonnets (fourteen-line poems). To find which one of his poems you are to type in, go to https://www.opensourceshakespeare.org/views/sonnets/sonnets.php Take the last two digits of your student number, and click on the sonnet number that matches that part of your student number. For example, if your student number is 100012345, choose sonnet 45. 2. Log into . 3. To create a new file in Linux, you type vi followed by the new file’s name. Type vi sonnet 4. You will see an empty text file. The ~ characters on the left indicate empty (non-existent) lines of text. When you start vi you are in command mode, so you cannot enter text yet. To get into regular insert mode, press the i key and type in your sonnet (do not include the title or the line numbers at the ends of lines 5, 10 and 14, but do include the spaces at the start of lines 13 and 14). Remember to press Enter at the end of each line. 5. To save the file, you must enter command mode. Press Esc to do so. You can always press Esc at any time to enter command mode. To save the file and exit vi, press ZZ (that is, two capital Z’s). 6. You should now be back at the Linux prompt. Use cat sonnet to verify that you have saved your file and that it contains the correct text. Obtain a screenshot. Editing a Text File 7. Use vi sonnet to open your text file again. Notice that you again start off in command mode, which you can check by using cursor movement keys. Write down a brief description of what each of the following nine keys does. You may have to move the cursor into the centre of your poem before using the keys, to make the purpose of each character more obvious. a. Each of the letters h, j, k, l. b. The letters b, w. c. The symbols $, ^. d. The control code ^g, and a number followed immediately by G. 8. You will now add a line to the end of the document. Remember that you are still in command mode. You can enter insert mode in a number of ways. When you want to add text below an existing line of text, use the o command (think “o” for “open”). Move the cursor down to the last line of the document, then press o. Then type the following text: This is the end of the file. Press Esc to get back into command mode. 9. You will now add a line to the top of the document. When you want to add text above an existing line of text, use the O (capital O, not zero) command. Move the cursor to the top of the document and press O. Type the following: My own sonnet and press Enter. Press Esc to get back into command mode. 10. You will now insert lines in the middle of the document. To do so, move the cursor to the position in your document where you want to insert a line. Press o or O depending on whether you want to add the line below or above your cursor position. Use this information to add a row of about ten dashes (the exact number isn’t important) just above the line reading This is the end of the file. Get back into command mode. 11. Copying and pasting a line of text is done using the “yank” and “put” commands in vi. What you will do next is to copy the row of dashes that you just added, and paste it underneath the title line at the top of the document. In command mode, move the cursor to the line of dashes. Press yy to copy the entire line to the buffer. Now, move the cursor to the top line of your file, which should be the title line. There are two ways to paste the contents of the buffer: p pastes the contents below the current cursor position, and P pastes the contents above the current position. Since we would like the dashes to go below the title line, press lowercase p. Obtain a screenshot. 12. At this point, you can save the file and exit vi as you did earlier (by pressing ZZ), but you can also simply save the file and carry on editing. To save the file, make sure you’re in command mode (using Esc), and type :w (colon and w) to write the file to disk. 13. As well as knowing how to enter new lines of text, you will also need to know how to insert text at the start, in the middle of a line, or at the end of a line. a. To add text to the start of a line, move the cursor to the beginning of the line, press i to enter insert mode, type the text, and press Esc to exit insert mode. Use this technique to add the text Lab 3: to the beginning of the first line of the file. b. To add text in the middle of a line, move the cursor to the spot where you want your new text to start, press i, type the text, and then exit insert mode. Use this technique to insert ***** (five asterisks) in the middle of the fifth line of the sonnet. c. To add text at the end of a line, move the cursor to any position in the line and press A (think “after”). Type the text, then press Esc. Use this technique to add The end! at the end of the last line of the very last line of the file. Obtain a screenshot. 14. There are several ways to delete text while in command mode. a. Use x to delete the character under the cursor. b. Use dw to delete from the cursor position to the end of the current word. c. Use dd to delete the current line. Note that methods (b) and (c) also copy the deleted text to the buffer, so you can paste what you have deleted to another part of your file. d. Using the above information plus what you learned earlier, delete the lines of dashes and each line with a blank line instead. Delete the word own from the first line. Replace the word file with poem. e. Sometimes it is useful to be able to delete the entire last part of a line of text, or to replace the last part of a line with new text. You would use D to delete everything from the cursor position to the end of the line; you would use R to enter replace mode, where everything you type overwrites the current text on the line. Make sure you’re in command mode, and move the cursor to the T in The end! Press R, and type the text Wasn't it great? to replace the previous text. Then press Esc to enter command mode. 15. As you can see, files in vi consist of individual lines. Unlike in the Windows programs Word or Notepad, you must press Enter at the end of each line rather than just continue typing. Sometimes you may find that after you created two separate lines of text, that you would now like to join them together as one line of text. a. Go to the last line of your document. Press o to add text to the file. b. Type the following four words, making sure to put each on a separate line: These are four words. c. In command mode, move the cursor to the line reading These. Press J (for “join”), and notice that the word are moves up and becomes part of the current line. Press J twice more to complete the sentence. 16. To search for text, you use the / command. In command mode, type /a to find the next occurrence of the letter a in the file. Once you have found the first occurrence, you can press n or N to find the next or previous occurrence of the same text. Press n repeatedly to cycle through all the occurrences of a in the file. 17. Searching and replacing is a bit more complicated. a. To search for text and replace it with new text, use :s/old/new/ while in command mode. For example (but don’t do it yet), to replace the next occurrence of the with THE, you would type :s/the/THE/ while in command mode. b. If you wish to replace all occurrences of a text string throughout the entire file, you use :%s/old/new/ in command mode. You would do the following to capitalize occurrences of a in the file: :%s/a/A/ Here, only the first a in each line is capitalized. If you wanted to change every a on each line, you would have to put the code g (for “global”) after the last / in the command, as in: :%s/a/A/g c. If you ever do an edit which you don’t like you can undo the change. Simply press u to undo the last command. If you press u repeatedly now, you will undo the last number of commands. To redo the commands, press Ctrl-r. d. Obtain a screenshot showing the file with all a’s changed to capital A’s. e. Save the file and exit vi. Create and Modify a Text File Now you will get to enter a text file and make changes as directed. Follow the steps, using what you have learned in the earlier part of this lab. 1. Using vi, create a new file called lab3. Enter the text that you see below, keeping the line breaks as shown. This is a test to see what you have learned. Here are some lines of text to enter. When you have entered them all, you will do a few editing commands. I hope that you have learned well. 2. Obtain a screenshot, then save the file. 3. Change the words a test to read an exercise. 4. Add the title My Awesome File by as the top line of the document. Put your name at the end of the line. 5. Edit the document so that each full sentence (ending with a “.” period) is on its own individual line of text. 6. Delete the word editing. 7. Put a blank line in between the title and the first sentence. 8. Change all the lowercase e’s in the document to capital E’s. 9. Use cut and paste to change the order of the sentences in the document, so that they appear in alphabetical order “Here are
”, “I hope
”, “This is
”, and “When you
”. 10. At the end of the document, add a line of dashes and a line that reads AAAKKK and your section number. 11. Obtain a screenshot, then save the file and exit vi.   

In: Computer Science