PrizeExample/.DS_Store
__MACOSX/PrizeExample/._.DS_Store
PrizeExample/.git/COMMIT_EDITMSG
Initial Commit
PrizeExample/.git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
PrizeExample/.git/description
Unnamed repository; edit this file 'description' to name the repository.
PrizeExample/.git/HEAD
ref: refs/heads/master
PrizeExample/.git/hooks/applypatch-msg.sample
#!/bin/sh
#
# An example hook script to check the commit log message taken by
# applypatch from an e-mail message.
#
# The hook should exit with non-zero status after issuing an
# appropriate message if it wants to stop the commit. The hook is
# allowed to edit the commit message file.
#
# To enable this hook, rename this file to "applypatch-msg".
. git-sh-setup
test -x "$GIT_DIR/hooks/commit-msg" &&
exec "$GIT_DIR/hooks/commit-msg" ${1+"[email protected]"}
:
PrizeExample/.git/hooks/commit-msg.sample
#!/bin/sh
#
# An example hook script to check the commit log message.
# Called by "git commit" with one argument, the name of the file
# that has the commit message. The hook should exit with non-zero
# status after issuing an appropriate message if it wants to stop the
# commit. The hook is allowed to edit the commit message file.
#
# To enable this hook, rename this file to "commit-msg".
# Uncomment the below to add a Signed-off-by line to the message.
# Doing this in a hook is a bad idea in general, but the prepare-commit-msg
# hook is more suited to it.
#
# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
# This example catches duplicate Signed-off-by lines.
test "" = "$(grep '^Signed-off-by: ' "$1" |
sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
echo >&2 Duplicate Signed-off-by lines.
exit 1
}
PrizeExample/.git/hooks/post-update.sample
#!/bin/sh
#
# An example hook script to prepare a packed repository for use over
# dumb transports.
#
# To enable this hook, rename this file to "post-update".
exec git update-server-info
PrizeExample/.git/hooks/pre-applypatch.sample
#!/bin/sh
#
# An example hook script to verify what is about to be committed
# by applypatch from an e-mail message.
#
# The hook should exit with non-zero status after issuing an
# appropriate message if it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-applypatch".
. git-sh-setup
test -x "$GIT_DIR/hooks/pre-commit" &&
exec "$GIT_DIR/hooks/pre-commit" ${1+"[email protected]"}
:
PrizeExample/.git/hooks/pre-commit.sample
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an .
Testing Gas Mileage Claims Assume that you are working for the C.docxmattinsonjanel
The Consumer Protection Agency tested the highway gas mileage of 40 Dodge Caravans selected randomly from Chrysler Corporation. Their results showed a mean of 26.7 mpg with a standard deviation of 4.2 mpg. This supports Chrysler's claim of 28 mpg since the p-value is 0.0287. However, when Chrysler claimed the standard deviation was 2.1 mpg, testing showed the p-value was approximately zero, so this claim is rejected. Any necessary action Chrysler must take depends on the test results, and variability tests along with mean tests are necessary to fully evaluate gas mileage claims.
Slides for a pre-conference workshop I delivered together with Johan Abildskov (@randomsort) at Git Merge 2017 in Brussels.
In the workshop we covered fun things to do with Git hooks, Git attributes and custom drivers.
In the first half, we demonstrate how you can implement a fully local continuous integration workflow using git hooks.
In the second half, we cover cool and creative ways to diff binary files and custom filters for modifying file content while commit'ing.
Git Anti-Patterns - Extended Version With 28 Common Anti-Patterns) - SCTurkey...Lemi Orhan Ergin
This document discusses common Git anti-patterns and provides recommendations to avoid them. It begins by explaining how Git works under the hood in terms of files, folders, references, and objects. It then covers 15 specific anti-patterns to avoid, such as treating Git like Dropbox, having long-living topic branches, merging too late without validation, and being afraid to delete branches. For each anti-pattern, it provides alternatives and recommendations, such as splitting work into small tasks, committing early and often, rebasing rather than merging, and deleting merged branches. The overall message is how to use Git properly and cure common issues by following best practices.
Git Anti-Patterns: How To Mess Up With Git and Love it AgainLemi Orhan Ergin
Git is one of the most powerful tool in developers' toolbox. If you use it correctly, it dramatically increases productivity of developers and eliminates the waste products continuously. Developers cultivate a development culture on top Git most of the time.
It's powerful but its power is untamed. Many teams fall into several traps of misusing commands and therefore feel uncomfortable while using Git. We mess up Git history, the codebase and the whole preferred branching strategy in seconds. We use branches, merge/rebase strategies, creating commits in wrong ways. Even we never take committing paradigms into account while using Git.
As a software craftsman, I've been using Git for years and I've already educated Git to hundreds of developers in all levels. I'm so lucky; I had a chance to experience huge amount of anti-patterns in time. In this talk, I will talk about what those anti-patterns are and what should we do in order not to fall into them.
Git Anti-Patterns: How To Mess Up With Git and Love it Again - DevoxxPL 2017Lemi Orhan Ergin
This document contains the slides from a presentation on best practices for using Git and avoiding common antipatterns. It discusses how Git works internally and the different objects it uses to store files, references, and commits. It then covers strategies for committing code early and often in small batches, rebasing regularly to integrate changes, squashing commits before merging back to the main branch, and using feature flags to disable unreleased features. The overall message is to leverage Git's power effectively while avoiding long-lived topic branches, loose commit histories, and other issues that can arise from not understanding Git's model.
This document provides an overview of Git commands and workflows:
- It introduces basic Git commands for setting up a local repository, adding and committing files, viewing the status and differences between commits, ignoring files, and more.
- Common workflows are demonstrated including cloning a repository, making changes and committing them locally, and pushing changes to a remote repository.
- More advanced topics are covered like branching, merging, rebasing, resolving conflicts, and using tools to help with these processes.
- Configuration options and tips are provided to customize Git behavior and inspect repositories.
1. The document discusses various good and bad practices for using Git, including committing early and often, squashing commits before merging, and avoiding long-lived topic branches.
2. It recommends splitting large features into small shippable tasks, committing changes early and often without worrying about compilation or CI, and rebasing regularly to integrate changes from the main branch.
3. Changes should be "perfected" later by squashing commits and making the history a single commit before merging back to the main branch when tests pass and code is reviewed.
Testing Gas Mileage Claims Assume that you are working for the C.docxmattinsonjanel
The Consumer Protection Agency tested the highway gas mileage of 40 Dodge Caravans selected randomly from Chrysler Corporation. Their results showed a mean of 26.7 mpg with a standard deviation of 4.2 mpg. This supports Chrysler's claim of 28 mpg since the p-value is 0.0287. However, when Chrysler claimed the standard deviation was 2.1 mpg, testing showed the p-value was approximately zero, so this claim is rejected. Any necessary action Chrysler must take depends on the test results, and variability tests along with mean tests are necessary to fully evaluate gas mileage claims.
Slides for a pre-conference workshop I delivered together with Johan Abildskov (@randomsort) at Git Merge 2017 in Brussels.
In the workshop we covered fun things to do with Git hooks, Git attributes and custom drivers.
In the first half, we demonstrate how you can implement a fully local continuous integration workflow using git hooks.
In the second half, we cover cool and creative ways to diff binary files and custom filters for modifying file content while commit'ing.
Git Anti-Patterns - Extended Version With 28 Common Anti-Patterns) - SCTurkey...Lemi Orhan Ergin
This document discusses common Git anti-patterns and provides recommendations to avoid them. It begins by explaining how Git works under the hood in terms of files, folders, references, and objects. It then covers 15 specific anti-patterns to avoid, such as treating Git like Dropbox, having long-living topic branches, merging too late without validation, and being afraid to delete branches. For each anti-pattern, it provides alternatives and recommendations, such as splitting work into small tasks, committing early and often, rebasing rather than merging, and deleting merged branches. The overall message is how to use Git properly and cure common issues by following best practices.
Git Anti-Patterns: How To Mess Up With Git and Love it AgainLemi Orhan Ergin
Git is one of the most powerful tool in developers' toolbox. If you use it correctly, it dramatically increases productivity of developers and eliminates the waste products continuously. Developers cultivate a development culture on top Git most of the time.
It's powerful but its power is untamed. Many teams fall into several traps of misusing commands and therefore feel uncomfortable while using Git. We mess up Git history, the codebase and the whole preferred branching strategy in seconds. We use branches, merge/rebase strategies, creating commits in wrong ways. Even we never take committing paradigms into account while using Git.
As a software craftsman, I've been using Git for years and I've already educated Git to hundreds of developers in all levels. I'm so lucky; I had a chance to experience huge amount of anti-patterns in time. In this talk, I will talk about what those anti-patterns are and what should we do in order not to fall into them.
Git Anti-Patterns: How To Mess Up With Git and Love it Again - DevoxxPL 2017Lemi Orhan Ergin
This document contains the slides from a presentation on best practices for using Git and avoiding common antipatterns. It discusses how Git works internally and the different objects it uses to store files, references, and commits. It then covers strategies for committing code early and often in small batches, rebasing regularly to integrate changes, squashing commits before merging back to the main branch, and using feature flags to disable unreleased features. The overall message is to leverage Git's power effectively while avoiding long-lived topic branches, loose commit histories, and other issues that can arise from not understanding Git's model.
This document provides an overview of Git commands and workflows:
- It introduces basic Git commands for setting up a local repository, adding and committing files, viewing the status and differences between commits, ignoring files, and more.
- Common workflows are demonstrated including cloning a repository, making changes and committing them locally, and pushing changes to a remote repository.
- More advanced topics are covered like branching, merging, rebasing, resolving conflicts, and using tools to help with these processes.
- Configuration options and tips are provided to customize Git behavior and inspect repositories.
1. The document discusses various good and bad practices for using Git, including committing early and often, squashing commits before merging, and avoiding long-lived topic branches.
2. It recommends splitting large features into small shippable tasks, committing changes early and often without worrying about compilation or CI, and rebasing regularly to integrate changes from the main branch.
3. Changes should be "perfected" later by squashing commits and making the history a single commit before merging back to the main branch when tests pass and code is reviewed.
This document provides instructions for migrating legacy Rails apps to Rails 3. It discusses updating the Rails version and dependencies using Bundler, upgrading plugins to gems, refactoring controllers to be RESTful, and addressing deprecation warnings. The rails_upgrade plugin helps analyze apps and generate a Gemfile to ease the upgrade process. Key steps include running checks and generating backups before upgrading code to Rails 3 features.
The document provides an overview of common Git commands organized into categories like init/clone, add/commit, branch, log, diff/blame, undo/revert, merge/rebase, remote operations and more. It also includes explanations of concepts like the three main areas in Git (working directory, staging area, HEAD), and tips like using fetch instead of pull and following a forking workflow. The document is intended to teach attendees the essentials of using Git through explaining commands and best practices.
This post originally created for my talk in the Sydney Ruby Meetup, I’ve found Rake to be quite a powerful tool and I’m definitely going to use some these features in my projects.
https://medium.com/@rudyyazdi/rake-gem-explained-ebee7e6e6f72
Here Don goes over some of the benefits of using GIT as well as some of the basic concepts and methods. Later he goes through the workflow of using GIT. Download his slides here or email him at dlee@tagged.com.
Short talk about Git best practices I held during a Lunch&Learn in our Milan office @Gild.
The session was interactive with lots of examples.
AGENDA:
- Using aliases for git commands
- Stats: my most used commands
- Useful list of git aliases
- Work scenarios
Puppet loves RSpec, why you should, tooDennis Rowe
This document discusses using RSpec to test Puppet manifests. It provides instructions for setting up RSpec testing for Puppet, including installing RVM and the puppetlabs_spec_helper gem. It then demonstrates writing RSpec tests for simple Puppet classes, showing how to test for packages, resources, and conditionals. The document emphasizes that testing non-obvious behaviors and complex code is most valuable.
This document discusses using RSpec to test Puppet manifests. It provides instructions for setting up RSpec testing for Puppet, including installing RVM and the puppetlabs_spec_helper gem. It then demonstrates writing RSpec tests for simple Puppet classes, showing how to test for packages, resources, and conditionals. The document emphasizes that testing non-obvious behaviors and complex code is most valuable.
The document provides an outline on installing and configuring Git, introduces common Git concepts and commands, discusses various Git workflows and hosting options on GitHub and Bitbucket, and includes examples of using Git in case studies. It covers topics such as setting up a local and global Git configuration, interacting with the staging area and working directory, branching and merging, and resolving conflicts. The document is intended to teach users the basics of using the popular version control system Git.
The document discusses various productivity tools and techniques for working with Git and on Mac OS X. It provides tips for using Git aliases and commands to simplify workflows. It recommends using TextMate for coding and leveraging its code completion features. It also recommends using multiple monitors, Exposé, Spaces and keyboard shortcuts in Mac OS X to improve efficiency. Priority zones are outlined for focusing on communication, primary work and other tasks.
This document provides an overview of using Git version control system, including:
1. The different types of version control systems like local (LVCS), centralized (CVCS), and distributed (DVCS) like Git.
2. Basic Git commands and workflows for creating a repository, adding/committing files, tagging versions, branching, merging, and working with remotes.
3. Examples of common branching workflows for topics, long-running branches, hotfixes, and merging branches with conflicts.
4. How to push/pull from remote repositories, delete remote branches, and work with tracking branches.
You already know how to use “git status”, “git push”, and “git add” for your personal projects. You know how to work on a team project with git version control. How do you achieve the next level of git mastery and become as productive as possible? Mistakes happen very frequently when coding. Sometimes they can be terrifying mistakes. You’ll learn git commands to un-do your coding mistakes effortlessly. How do you re-order, edit, remove, and squash commits? You’ll understand the differences between all the "git r*” commands: "git rebase", "git revert", "git reset", and "git reflog" and know when and why to use them. We’ll cover how to set up your git environment for a productive workflow, different ways to undo your mistakes in git, and finally, different ways to automate an entire git workflow.
These are the slides for a talk that I gave at PyTN 2015 on a Sunday morning.
- The document describes setting up Git and Gitosis for user access and repository management. It involves initializing an empty Git repository, generating SSH keys, and configuring Gitosis and post-update hooks to enable push access to managed repositories. The process sets up a dedicated 'git' system user and groups for secure administration of Git repositories.
Wrapped in a single session, you'll find the concepts and techniques that convert the average Git practitioner into a master of the craft. We'll go from technical topics like "efficient conflict resolution" and "effective code cleanup," to the often-asked "how to handle project dependencies with Git" and "how to manage massive repositories." And much more.
TYPO3 Extension development using new Extbase frameworkChristian Trabold
My presentation for the TYPO3 community day in Tokyo, Japan.
The code is available at https://github.com/ctrabold/t3ski-workshop.
Due to copyright issues I had to remove all pictures of Miffy.
This document provides tips and techniques for becoming a Git master, including:
1. Creating aliases to simplify common Git commands like committing and adding remotes. Aliases allow parameters and bash functions for complex commands.
2. Using features like assume-unchanged to hide files from Git and rerere to automate resolving similar conflicts.
3. Interactive rebasing to polish commit histories by squashing, rewording, and fixing up commits. Rebasing rewrites history so care is needed.
4. Techniques for preventing history tampering like reject force pushes and signing tags for verification. GPG keys can be stored and imported in Git.
5. Handling project dependencies with build tools or
This document provides an introduction to using Git. Some key points:
- Git is a distributed version control system that is different from CVS/SVN in that nearly every operation is local and Git stores snapshots of files rather than differences.
- The basics of using Git involve recording changes by checking status, adding files, committing changes, and working with remotes like origin.
- Additional topics covered include undoing changes, working with others through branching and merging, tagging versions, and using tools like interactive mode and stashing.
This document provides an introduction to using Git and GitHub for version control and collaboration. It begins with setting up Git locally, including initializing a repository and making commits. It then covers branching, merging, and pushing changes to a remote repository hosted on GitHub. The document concludes with challenges for learning Git and GitHub workflows through hands-on practice with a partner.
In this tutorial, we will explain how to get your own GitHub instance running on your own Ubuntu 12.04 VPS. Ubuntu 12.04 is recommended because of some incompatibilities between Python and Ruby on other Linux distributions. Also, make sure you have at least 1GB RAM memory on your VPS. Our first step is to install some required packages and dependencies.
Presented by VEXXHOST, provider of Openstack based Public and Private Cloud Infrastructure
https://vexxhost.com/
Problem 1
Problem 2 (two screen shots)
Problem 3 (two screen shots)
Problem 4 (three screen shots)
Problem 5 (one screen shot)
Problem 6 (six screenshots plus a data table)
.
Problem 20-1A Production cost flow and measurement; journal entrie.docxChantellPantoja184
Problem 20-1A Production cost flow and measurement; journal entries L.O. P1, P2, P3, P4
[The following information applies to the questions displayed below.]
Edison Company manufactures wool blankets and accounts for product costs using process costing. The following information is available regarding its May inventories.
Beginning
Inventory
Ending
Inventory
Raw materials inventory
$
60,000
$
41,000
Goods in process inventory
449,000
521,500
Finished goods inventory
610,000
342,001
The following additional information describes the company's production activities for May.
Raw materials purchases (on credit)
$
250,000
Factory payroll cost (paid in cash)
1,850,300
Other overhead cost (Other Accounts credited)
82,000
Materials used
Direct
$
200,500
Indirect
50,000
Labor used
Direct
$
1,060,300
Indirect
790,000
Overhead rate as a percent of direct labor
115
%
Sales (on credit)
$
3,000,000
The predetermined overhead rate was computed at the beginning of the year as 115% of direct labor cost.
\\\\\
rev: 11_02_2011
references
1.
value:
2.00 points
Problem 20-1A Part 1
Required:
1(a)
Compute the cost of products transferred from production to finished goods. (Omit the "$" sign in your response.)
Cost of products transferred
$
1(b)
Compute the cost of goods sold. (Omit the "$" sign in your response.)
Cost of goods sold
$
rev: 10_31_2011
check my workeBook Links (4)references
2.
value:
5.00 points
Problem 20-1A Part 2
2(a)
Prepare journal entry dated May 31 to record the raw materials purchases. (Omit the "$" sign in your response.)
Date
General Journal
Debit
Credit
May 31
2(b)
Prepare journal entry dated May 31 to record the direct materials usage. (Omit the "$" sign in your response.)
Date
General Journal
Debit
Credit
May 31
2(c)
Prepare journal entry dated May 31 to record the indirect materials usage. (Omit the "$" sign in your response.)
Date
General Journal
Debit
Credit
May 31
2(d)
Prepare journal entry dated May 31 to record the payroll costs. (Omit the "$" sign in your response.)
Date
General Journal
Debit
Credit
May 31
2(e)
Prepare journal entry dated May 31 to record the direct labor costs. (Omit the "$" sign in your response.)
Date
General Journal
Debit
Credit
May 31
2(f)
Prepare journal entry dated May 31 to record the indirect labor costs. (Omit the "$" sign in your response.)
Date
General Journal
Debit
Credit
May 31
2(g)
Prepare journal entry dated May 31 to record the other overhead costs. (Omit the "$" sign in your response.)
Date
General Journal
Debit
Credit
May 31
2(h)
Prepare journal entry dated May 31 to record the overhead applied. (Omit the "$" sign in your response.)
Date
General Journal
Debit
Credit
May 31
2(i)
Prepare journal entry dated May 31 to record the goods transferred from production to finished goods.(Omit the "$" sign in yo.
More Related Content
Similar to PrizeExample.DS_Store__MACOSXPrizeExample._.DS_StoreP.docx
This document provides instructions for migrating legacy Rails apps to Rails 3. It discusses updating the Rails version and dependencies using Bundler, upgrading plugins to gems, refactoring controllers to be RESTful, and addressing deprecation warnings. The rails_upgrade plugin helps analyze apps and generate a Gemfile to ease the upgrade process. Key steps include running checks and generating backups before upgrading code to Rails 3 features.
The document provides an overview of common Git commands organized into categories like init/clone, add/commit, branch, log, diff/blame, undo/revert, merge/rebase, remote operations and more. It also includes explanations of concepts like the three main areas in Git (working directory, staging area, HEAD), and tips like using fetch instead of pull and following a forking workflow. The document is intended to teach attendees the essentials of using Git through explaining commands and best practices.
This post originally created for my talk in the Sydney Ruby Meetup, I’ve found Rake to be quite a powerful tool and I’m definitely going to use some these features in my projects.
https://medium.com/@rudyyazdi/rake-gem-explained-ebee7e6e6f72
Here Don goes over some of the benefits of using GIT as well as some of the basic concepts and methods. Later he goes through the workflow of using GIT. Download his slides here or email him at dlee@tagged.com.
Short talk about Git best practices I held during a Lunch&Learn in our Milan office @Gild.
The session was interactive with lots of examples.
AGENDA:
- Using aliases for git commands
- Stats: my most used commands
- Useful list of git aliases
- Work scenarios
Puppet loves RSpec, why you should, tooDennis Rowe
This document discusses using RSpec to test Puppet manifests. It provides instructions for setting up RSpec testing for Puppet, including installing RVM and the puppetlabs_spec_helper gem. It then demonstrates writing RSpec tests for simple Puppet classes, showing how to test for packages, resources, and conditionals. The document emphasizes that testing non-obvious behaviors and complex code is most valuable.
This document discusses using RSpec to test Puppet manifests. It provides instructions for setting up RSpec testing for Puppet, including installing RVM and the puppetlabs_spec_helper gem. It then demonstrates writing RSpec tests for simple Puppet classes, showing how to test for packages, resources, and conditionals. The document emphasizes that testing non-obvious behaviors and complex code is most valuable.
The document provides an outline on installing and configuring Git, introduces common Git concepts and commands, discusses various Git workflows and hosting options on GitHub and Bitbucket, and includes examples of using Git in case studies. It covers topics such as setting up a local and global Git configuration, interacting with the staging area and working directory, branching and merging, and resolving conflicts. The document is intended to teach users the basics of using the popular version control system Git.
The document discusses various productivity tools and techniques for working with Git and on Mac OS X. It provides tips for using Git aliases and commands to simplify workflows. It recommends using TextMate for coding and leveraging its code completion features. It also recommends using multiple monitors, Exposé, Spaces and keyboard shortcuts in Mac OS X to improve efficiency. Priority zones are outlined for focusing on communication, primary work and other tasks.
This document provides an overview of using Git version control system, including:
1. The different types of version control systems like local (LVCS), centralized (CVCS), and distributed (DVCS) like Git.
2. Basic Git commands and workflows for creating a repository, adding/committing files, tagging versions, branching, merging, and working with remotes.
3. Examples of common branching workflows for topics, long-running branches, hotfixes, and merging branches with conflicts.
4. How to push/pull from remote repositories, delete remote branches, and work with tracking branches.
You already know how to use “git status”, “git push”, and “git add” for your personal projects. You know how to work on a team project with git version control. How do you achieve the next level of git mastery and become as productive as possible? Mistakes happen very frequently when coding. Sometimes they can be terrifying mistakes. You’ll learn git commands to un-do your coding mistakes effortlessly. How do you re-order, edit, remove, and squash commits? You’ll understand the differences between all the "git r*” commands: "git rebase", "git revert", "git reset", and "git reflog" and know when and why to use them. We’ll cover how to set up your git environment for a productive workflow, different ways to undo your mistakes in git, and finally, different ways to automate an entire git workflow.
These are the slides for a talk that I gave at PyTN 2015 on a Sunday morning.
- The document describes setting up Git and Gitosis for user access and repository management. It involves initializing an empty Git repository, generating SSH keys, and configuring Gitosis and post-update hooks to enable push access to managed repositories. The process sets up a dedicated 'git' system user and groups for secure administration of Git repositories.
Wrapped in a single session, you'll find the concepts and techniques that convert the average Git practitioner into a master of the craft. We'll go from technical topics like "efficient conflict resolution" and "effective code cleanup," to the often-asked "how to handle project dependencies with Git" and "how to manage massive repositories." And much more.
TYPO3 Extension development using new Extbase frameworkChristian Trabold
My presentation for the TYPO3 community day in Tokyo, Japan.
The code is available at https://github.com/ctrabold/t3ski-workshop.
Due to copyright issues I had to remove all pictures of Miffy.
This document provides tips and techniques for becoming a Git master, including:
1. Creating aliases to simplify common Git commands like committing and adding remotes. Aliases allow parameters and bash functions for complex commands.
2. Using features like assume-unchanged to hide files from Git and rerere to automate resolving similar conflicts.
3. Interactive rebasing to polish commit histories by squashing, rewording, and fixing up commits. Rebasing rewrites history so care is needed.
4. Techniques for preventing history tampering like reject force pushes and signing tags for verification. GPG keys can be stored and imported in Git.
5. Handling project dependencies with build tools or
This document provides an introduction to using Git. Some key points:
- Git is a distributed version control system that is different from CVS/SVN in that nearly every operation is local and Git stores snapshots of files rather than differences.
- The basics of using Git involve recording changes by checking status, adding files, committing changes, and working with remotes like origin.
- Additional topics covered include undoing changes, working with others through branching and merging, tagging versions, and using tools like interactive mode and stashing.
This document provides an introduction to using Git and GitHub for version control and collaboration. It begins with setting up Git locally, including initializing a repository and making commits. It then covers branching, merging, and pushing changes to a remote repository hosted on GitHub. The document concludes with challenges for learning Git and GitHub workflows through hands-on practice with a partner.
In this tutorial, we will explain how to get your own GitHub instance running on your own Ubuntu 12.04 VPS. Ubuntu 12.04 is recommended because of some incompatibilities between Python and Ruby on other Linux distributions. Also, make sure you have at least 1GB RAM memory on your VPS. Our first step is to install some required packages and dependencies.
Presented by VEXXHOST, provider of Openstack based Public and Private Cloud Infrastructure
https://vexxhost.com/
Similar to PrizeExample.DS_Store__MACOSXPrizeExample._.DS_StoreP.docx (20)
Problem 1
Problem 2 (two screen shots)
Problem 3 (two screen shots)
Problem 4 (three screen shots)
Problem 5 (one screen shot)
Problem 6 (six screenshots plus a data table)
.
Problem 20-1A Production cost flow and measurement; journal entrie.docxChantellPantoja184
Problem 20-1A Production cost flow and measurement; journal entries L.O. P1, P2, P3, P4
[The following information applies to the questions displayed below.]
Edison Company manufactures wool blankets and accounts for product costs using process costing. The following information is available regarding its May inventories.
Beginning
Inventory
Ending
Inventory
Raw materials inventory
$
60,000
$
41,000
Goods in process inventory
449,000
521,500
Finished goods inventory
610,000
342,001
The following additional information describes the company's production activities for May.
Raw materials purchases (on credit)
$
250,000
Factory payroll cost (paid in cash)
1,850,300
Other overhead cost (Other Accounts credited)
82,000
Materials used
Direct
$
200,500
Indirect
50,000
Labor used
Direct
$
1,060,300
Indirect
790,000
Overhead rate as a percent of direct labor
115
%
Sales (on credit)
$
3,000,000
The predetermined overhead rate was computed at the beginning of the year as 115% of direct labor cost.
\\\\\
rev: 11_02_2011
references
1.
value:
2.00 points
Problem 20-1A Part 1
Required:
1(a)
Compute the cost of products transferred from production to finished goods. (Omit the "$" sign in your response.)
Cost of products transferred
$
1(b)
Compute the cost of goods sold. (Omit the "$" sign in your response.)
Cost of goods sold
$
rev: 10_31_2011
check my workeBook Links (4)references
2.
value:
5.00 points
Problem 20-1A Part 2
2(a)
Prepare journal entry dated May 31 to record the raw materials purchases. (Omit the "$" sign in your response.)
Date
General Journal
Debit
Credit
May 31
2(b)
Prepare journal entry dated May 31 to record the direct materials usage. (Omit the "$" sign in your response.)
Date
General Journal
Debit
Credit
May 31
2(c)
Prepare journal entry dated May 31 to record the indirect materials usage. (Omit the "$" sign in your response.)
Date
General Journal
Debit
Credit
May 31
2(d)
Prepare journal entry dated May 31 to record the payroll costs. (Omit the "$" sign in your response.)
Date
General Journal
Debit
Credit
May 31
2(e)
Prepare journal entry dated May 31 to record the direct labor costs. (Omit the "$" sign in your response.)
Date
General Journal
Debit
Credit
May 31
2(f)
Prepare journal entry dated May 31 to record the indirect labor costs. (Omit the "$" sign in your response.)
Date
General Journal
Debit
Credit
May 31
2(g)
Prepare journal entry dated May 31 to record the other overhead costs. (Omit the "$" sign in your response.)
Date
General Journal
Debit
Credit
May 31
2(h)
Prepare journal entry dated May 31 to record the overhead applied. (Omit the "$" sign in your response.)
Date
General Journal
Debit
Credit
May 31
2(i)
Prepare journal entry dated May 31 to record the goods transferred from production to finished goods.(Omit the "$" sign in yo.
Problem 2 Obtain Io.Let x be the current through j2, ..docxChantellPantoja184
Problem 2: Obtain Io.
Let x be the current through j2, .
Let .
.
.
.
………..1.
…………2.
.
.
…………3.
……………….4.
Solving these 4 equations we can get .
.
Problem 1:Find currents I1, I2, and I3
Problem 2: Obtain Io
Problem 3:Obtain io
.
Problem 1On April 1, 20X4, Rojas purchased land by giving $100,000.docxChantellPantoja184
Problem 1On April 1, 20X4, Rojas purchased land by giving $100,000 in cash and executing a $400,000 note payable to the former owner. The note bears interest at 10% per annum, with interest being payable annually on March 31 of each year. Rojas is also required to make a $100,000 payment toward the note's principal on every March 31.(a)Prepare the appropriate journal entry to record the land purchase on April 1, 20X4.(b)Prepare the appropriate journal entry to record the year-end interest accrual on December 31, 20X4.(c)Prepare the appropriate journal entry to record the payment of interest and principal on March 31, 20X5.(d)Prepare the appropriate journal entry to record the year-end interest accrual on December 31, 20X5.(e)Prepare the appropriate journal entry to record the payment of interest and principal on March 31, 20X6.
&R&"Myriad Web Pro,Bold"&20B-13.01
B-13.01
Worksheet 1(a), (b), (c), (d), (e)GENERAL JOURNALDateAccountsDebitCredit04-01-X412-31-X403-31-X512-31-X503-31-X6
&L&"Myriad Web Pro,Bold"&12Name:
Date: Section: &R&"Myriad Web Pro,Bold"&20B-13.01
B-13.01
Problem 2Ace Brick company issued $100,000 of 5-year bonds. The bonds were issued at par on January 1, 20X1, and bear interest at a rate of 8% per annum, payable semiannually.(a)Prepare the journal entry to record the bond issue on January, 20X1.(b)Prepare the journal entry that Ace would record on each interest date.(c)Prepare the journal entry that Ace would record at maturity of the bonds.
&R&"Myriad Web Pro,Bold"&20B-13.06
B-13.06
Worksheet 2(a)(b)(c)GENERAL JOURNAL DateAccountsDebitCreditIssueInterestMaturity
&L&"Myriad Web Pro,Bold"&12Name:
Date: Section: &R&"Myriad Web Pro,Bold"&20B-13.06
B-13.06
Problem 3Erik Food Supply Company issued $100,000 of face amount of 4-year bonds on January 1, 20X1. The bonds were issued at 98, and bear interest at a stated rate of 8% per annum, payable semiannually. The discount is amortized by the straight-line method.(a)Prepare the journal entry to record the initial issuance on January, 20X1.(b)Prepare the journal entry that Erik would record on each interest date.(c)Prepare the journal entry that Erik would record at maturity of the bonds.
&R&"Myriad Web Pro,Bold"&20B-13.08
B-13.08
Worksheet 3(a)(b)(c)GENERAL JOURNAL DateAccountsDebitCreditIssueInterestMaturity
&L&"Myriad Web Pro,Bold"&12Name:
Date: Section: &R&"Myriad Web Pro,Bold"&20B-13.08
B-13.08
Problem 4Horton Micro Chip Company issued $100,000 of face amount of 6-year bonds on January 1, 20X1. The bonds were issed at 103, and bear interest at a stated rate of 8% per annum, payable semiannually. The premium is amortized by the straight-line method.(a)Prepare the journal entry to record the initial issue on January, 20X1.(b)Prepare the journal entry that Horton would record on each interest date.(c)Prepare the journal entry that Horton would record at maturity of the bonds.
&R&"Myriad We.
Problem 17-1 Dividends and Taxes [LO2]Dark Day, Inc., has declar.docxChantellPantoja184
Problem 17-1 Dividends and Taxes [LO2]
Dark Day, Inc., has declared a $5.60 per share dividend. Suppose capital gains are not taxed, but dividends are taxed at 15 percent. New IRS regulations require that taxes be withheld at the time the dividend is paid. Dark Day sells for $94.10 per share, and the stock is about to go ex-dividend.
What do you think the ex-dividend price will be? (Round your answer to 2 decimal places. (e.g., 32.16))
Ex-dividend price
$
Problem 17-2 Stock Dividends [LO3]
The owners’ equity accounts for Alexander International are shown here:
Common stock ($0.60 par value)
$
45,000
Capital surplus
340,000
Retained earnings
748,120
Total owners’ equity
$
1,133,120
a-1
If Alexander stock currently sells for $30 per share and a 10 percent stock dividend is declared, how many new shares will be distributed?
New shares issued
a-2
Show how the equity accounts would change.
Common stock
$
Capital surplus
Retained earnings
Total owners’ equity
$
b-1
If instead Alexander declared a 20 percent stock dividend, how many new shares will be distributed?
New shares issued
b-2
Show how the equity accounts would change. (Negative amount should be indicated by a minus sign.)
Common stock
$
Capital surplus
Retained earnings
Total owners’ equity
$
Problem 17-3 Stock Splits [LO3]
The owners' equity accounts for Alexander International are shown here.
Common stock ($0.50 par value)
$
35,000
Capital surplus
320,000
Retained earnings
708,120
Total owners’ equity
$
1,063,120
a-1
If Alexander declares a five-for-one stock split, how many shares are outstanding now?
New shares outstanding
a-2
What is the new par value per share? (Round your answer to 3 decimal places. (e.g., 32.161))
New par value
$ per share
b-1
If Alexander declares a one-for-seven reverse stock split, how many shares are outstanding now?
New shares outstanding
b-2
What is the new par value per share? (Round your answer to 2 decimal places. (e.g., 32.16))
New par value
$ per share
Problem 17-4 Stock Splits and Stock Dividends [LO3]
Red Rocks Corporation (RRC) currently has 485,000 shares of stock outstanding that sell for $40 per share. Assuming no market imperfections or tax effects exist, what will the share price be after:
a.
RRC has a four-for-three stock split? (Round your answer to 2 decimal places. (e.g., 32.16))
New share price
$
b.
RRC has a 15 percent stock dividend? (Round your answer to 2 decimal places. (e.g., 32.16))
New share price
$
c.
RRC has a 54.5 percent stock dividend? (Round your answer to 2 decimal places. (e.g., 32.16))
New share price
$
d.
RRC has a two-for-seven reverse stock split? (Round your answer to 2 decimal places. (e.g., 32.16))
New share price
$
Determine the new number of shares outstanding in parts (a) through (d).
a.
New shares outstanding
b.
New shares o.
Problem 1Problem 1 - Constant-Growth Common StockWhat is the value.docxChantellPantoja184
Problem 1Problem 1 - Constant-Growth Common StockWhat is the value of a common stock if the firm's earnings and dividends are growing annually at 10%, the current dividend is $1.32,and investors require a 15% return on investment?What is the stock's rate of return if the market price of the stock is $35?
Problem 2Problem 2 - Preferred Stock Price and ReturnA firm has preferred stock outstanding with a $1,000 par value and a $40 annual dividend with no maturity. If the required rate of return is 9%, what is the price of the preferred stock?The market price of a firm's preferred stock is $24 and pays an annual dividend of $2.50. If the stock's par value is $1,000 and it has no maturity, what is the return on the preferred stock?
Problem 3Problem 3 - Bond Valuation and YieldA bond has a par value of $1,000, pays $50 semiannually and has a maturity of 10 years.If the bond earns 12% per year, what is the price of the bond?RateNperPMTFVTypePVWhat is the yield to maturity for the bond?NperPMTPVFVTypeRateWhat would be the bond's price if the rate earned declined to 8% per year?RateNperPMTFVTypePVIf the maturity period is reduced to 5 years and the required rate of return is 8%, what would be the price of the bond?RateNperPMTFVTypePVWhat is the yield to maturity for the bond when the maturity is 5 years and the required rate of return is 8%?NperPMTPVFVTypeRateWhat generalizations about bond prices, interest rates and maturity periods can be made based on the calculations made above?
Problem 4Problem 4 - Callable BondsThe following bonds have a par value of $1,000 and the required rate of return is 10%.Bond XY: 5¼ percent coupon, with interest paid annually for 20 yearsBond AB: 14 percent coupon, with interest paid annually for 20 yearsWhat is each bond's current market price?Bond XYBond ABRateNperPMTFVTypePVIf current interest rates are 9%, which bond would you expect to be called? Explain.
Exercise 10-5
During the month of March, Olinger Company’s employees earned wages of $69,500. Withholdings related to these wages were $5,317 for Social Security (FICA), $8,145 for federal income tax, $3,366 for state income tax, and $434 for union dues. The company incurred no cost related to these earnings for federal unemployment tax but incurred $760 for state unemployment tax.
Prepare the necessary March 31 journal entry to record salaries and wages expense and salaries and wages payable. Assume that wages earned during March will be paid during April. (Credit account titles are automatically indented when amount is entered. Do not indent manually.)
Date
Account Titles and Explanation
Debit
Credit
Mar. 31
SHOW LIST OF ACCOUNTS
LINK TO TEXT
Prepare the entry to record the company’s payroll tax expense. (Credit account titles are automatically indented when amount is entered. Do not indent manually.)
Date
Account Titles and Explanation
Debit
Credit
Mar. 31
===========================================
E.
Problem 1Prescott, Inc., manufactures bookcases and uses an activi.docxChantellPantoja184
Problem 1Prescott, Inc., manufactures bookcases and uses an activity-based costing system. Prescott's activity areas and related data follows:ActivityBudgeted Cost
of ActivityAllocation BaseCost Allocation
RateMaterials handling$230,000Number of parts$0.50Assembly3,200,000Direct labor hours16.00Finishing180,000Number of finished
units4.50Prescott produced two styles of bookcases in October: the standard bookcase and an unfinished bookcase, which has fewer parts and requires no finishing. The totals for quantities, direct
materials costs, and other data follow:ProductTotal Units
ProducedTotal Direct
Materials CostsTotal Direct
Labor CostsTotal Number
of PartsTotal Assembling
Direct Labor HoursStandard bookcase3,000$36,000$45,0009,0004,500Unfinished bookcase3,50035,00035,0007,0003,500Requirements:1. Compute the manufacturing product cost per unit of each type of bookcase.2. Suppose that pre-manufacturing activities, such as product design, were assigned to the standard bookcases at $7 each, and to the unfinished bookcases at $2 each. Similar analyses
were conducted of post-manufacturing activities such as distribution, marketing, and customer service. The post-manufacturing costs were $22 per standard bookcase and $14 per
unfinished bookcase. Compute the full product costs per unit.3. Which product costs are reported in the external financial statements? Which costs are used for management decision making? Explain the difference.4. What price should Prescott's managers set for unfinished bookcases to earn $15 per bookcase?
Problem 2Corbertt Pharmaceuticals manufactures an over-the-counter allergy medication. The company sells both large commercial containers of 1,000 capsules to health-care facilities
and travel packs of 20 capsules to shops in airports, train stations, and hotels. The following information has been developed to determine if an activity-based costing system
would be beneficial:ActivityEstimated Indirect Activity
CostsAllocation BaseEstimated Quantity of
Allocation BaseMaterials handling$95,000Kilos19,000 kilosPackaging219,000Machine hours5,475 hoursQuality assurance124,500Samples2,075 samplesTotal indirect costs$438,500Other production information includes the following:Commercial ContainersTravel PacksUnits produced3,500 containers57,000 packsWeight in kilos14,0005,700Machine hours2,625570Number of samples700855Requirements:1. Compute the cost allocation rate for each activity.2. Use the activity-based cost allocation rates to compute the activity costs per unit of the commercial containers and the travel packs. (Hint: First compute the total activity
cost allocated to each product line, and then compute the cost per unit.)3. Corbertt's original single-allocation-base costing system allocated indirect costs to produce at $157 per machine hour. Compute the total indirect costs allocated to the
commercial containers and to the travel packs under the original system. Then compute the indirect cost per unit for ea.
Problem 1Preston Recliners manufactures leather recliners and uses.docxChantellPantoja184
Problem 1Preston Recliners manufactures leather recliners and uses flexible budgeting and a standard cost system. Preston allocates overhead based on yards of direct materials. The company's performance report includes the following selected data:Static Budget
(1,000 recliners)Actual Results
(980 recliners)Sales (1,000 recliners X $495)$495,000 (980 recliners X $475)$465,500Variable manufacturing costs: Direct materials (6,000 yds @ $8.80/yard)52,800 (6,150 yds @ $8.60/yard)52,890 Direct labor (10,000 hrs @ $9.20/hour)92,000 (9,600 hrs @ $9.30/hour)89,280Variable overhead (6,000 yds @ $5.00/yard)30,000 (6,510 yds @ $6.40/yard)39,360Fixed manufacturing costs: Fixed overhead60,00062,000Total cost of goods sold$234,800$243,530Gross profit$260,200$221,970Requirements:1. Prepare a flexible budget based on the actual number of recliners sold.2. Compute the price variance and the efficiency variance for direct materials and for direct labor. For manufacturing overhead, compute the variable overhead spending, variable overhead efficiency, fixed overhead spending, and fixed overhead volume variances.3. Have Preston's managers done a good job or a poor job controlling materials, labor, and overhead costs? Why?4. Describe how Preston's managers can benefit from the standard costing system.
Problem 2AllTalk Technologies manufactures capacitors for cellular base stations and other communications applications. The company's January 2012 flexible budget income statement shows output levels of 6,500, 8,000, and 10,000 units. The static budget was based on expected sales of 8,000 units.ALLTALK TECHNOLOGIES
Flexible Budget Income Statement
Month Ended January 31, 2012Per UnitBy Units (Capacitors)6,5008,00010,000Sales revenue$24$156,000$192,000$240,000Variable expenses$1065,00080,000100,000Contribution margin$91,000$112,000$140,000Fixed expenses53,00053,00053,000Operating income$38,000$59,000$87,000The company sold 10,000 units during January, and its actual operating income was as follows:ALLTALK TECHNOLOGIES
Income Statement
Month Ended January 31, 2012Sales revenue$246,000Variable expenses104,500Contribution margin$141,500Fixed expenses54,000Operating income$87,500Requirements:1. Prepare an income statement performance report for January.2. What was the effect on AllTalk's operating income of selling 2,000 units more than the static budget level of sales?3. What is AllTalk's static budget variance? Explain why the income statement performance report provides more useful information to AllTalk's managers than the simple static budget variance. What insights can AllTalk's managers draw from this performance report?
Problem 3Java manufacturers coffee mugs that it sells to other companies for customizing with their own logos. Java prepares flexible budgets and uses a standard cost system to control manufacturing costs. The standard unit.
Problem 1Pro Forma Income Statement and Balance SheetBelow is the .docxChantellPantoja184
Problem 1Pro Forma Income Statement and Balance SheetBelow is the income statement and balance sheet for Blue Bill Corporation for 2013. Based on the historical statements and theadditional information provided, construct the firm's pro forma income statement and balance sheet for 2014.Blue Bill CorporationIncome StatementFor the year ended 2013Projected201220132014Revenue$60,000$63,000Cost of goods sold42,00044,100Gross margin18,00018,900SG&A expense6,0006,300Depreciation expense1,8002,000Earnings Before Interest and Taxes (EBIT)10,20010,600Interest expense1,5001,800Taxable income8,7008,800Income Tax Expense3,0453,080Net income5,6555,720Dividends750800To retained earnings$4,905$4,920Additional income statement information:Sales will increase by 5% in 2014 from 2013 levels.COGS and SG&A will be the average percent of sales for the last 2 years.Depreciation expense will increase to $2,200.Interest expense will be $1,900.The tax rate is 35%.Dividend payout will increase to $850.Blue Bill CorporationBalance SheetDecember 31, 2013Projected20132014Current assetsCash$8,000Accounts receivable3,150Inventory9,450Total current assets20,600Property, plant, and equipment (PP&E)28,500Accumulated depreciation16,400Net PP&E12,100Total assets$32,700Current liabilitesAccounts payable$3,780Bank loan (10%)3,200Other current liabilities1,250Total current liabilities8,230Long-term debt (12%)4,800Common stock1,250Retained earnings18,420Total liabilities and equity$32,700Additional balance sheet information:The minimum cash balance is 12% of sales.Working capital accounts (accounts receivable, accounts payable, and inventory) will be the same percent of sales in 2014 as they were in 2013.$8,350 of new PP&E will be purchased in 2014.Other current liabilities will be 3% of sales in 2014.There will be no changes in the common stock or long-term debt accounts.The plug figure (the last number entered that makes the balance sheet balance) is bank loan.
1
Rough Draft
Rough Draft
Rasmussen College
Metro Dental Care is a dental office that provides affordable, convenient, and high quality of care to patients. As a patient at Metro, I personally believe that Metro Dental Care is one of the best dental clinics around, and that’s why I have chosen this company. Metro Dental Care measures their results by recording patient satisfaction.
Managing financial reports, and the quality of service they provide to their customers. Furthermore, the dentists and staff at Metro Dental Care know how important your smile is. Their mission statement states “We pride ourselves in making your smile look great so you not only look good, but feel confident with your smile.”
Metro Dental Care offers convenience for their patients with more than 40 offices throughout the Minneapolis and St. Paul metro area offering flexible hours including early morning, evening and Saturday appointments. Whether you work or live Metro Dental Care has a location near you. Metro Dental .
Problem 2-1PROBLEM 2-1Solution Legend= Value given in problemGiven.docxChantellPantoja184
This document provides a solution to Problem 2-1. It begins by listing the values given in the problem statement. The document then likely shows the step-by-step work and calculations to arrive at the solution for Problem 2-1, ending with the final answer.
PROBLEM 14-6AProblem 14-6A Norwoods Borrowings1. Total amount of .docxChantellPantoja184
PROBLEM 14-6AProblem 14-6A: Norwoods Borrowings1. Total amount of each installment payment.Present value of an ordinary annuity$200,000Interest per period(i)0.08Number of periods(n)5Total amount of each installment payment($50,091.29)Therefore the total amount of each installment payment is $ 50,091.292.Norwoods Amortization TablePeriod Ending DateBeginning balance Interest expenseNotes PayableCash paymentEnding Balance10/31/15$200,000.00$16,000.00$34,091.29$50,091.29$165,908.7110/31/16$165,909.00$13,272.72$36,818.57$50,091.29$129,090.4310/31/17$129,090.43$10,327.23$39,764.06$50,091.29$89,326.3710/31/18$89,326.37$7,146.11$42,945.18$50,091.29$46,381.1910/31/19$46,381.19$3,710.50$46,380.79$50,091.29$0.403.a) Accrued interest as December 31st 2015Accrued interest expense = $200,000*8%*2/12= $2,666.67. Thus the journal entry is as shown below:DescriptionDr($)Cr($)interest expense $2,666.67 Interest payable $2,666.67b) The first annual payment on the note.Ten more months of interest has accrued $200,000*8%*10/12 =$13,333.33 accrued interest .Therefore the journal entry is as shown below:DescriptionDr($)Cr($)Notes payable$34,091.29interest expense$13,333.33interest payable$2,666.67 Cash$50,091.29
PROBLEM 14-7AProblem 14-7AQuestion 1a) Debt to equity ratiosPulaski CompanyScott Company Total liabilities$360,000.00$240,000.00Total Equity$500,000.00$200,000.00Debt-Equity Ratio0.721.2Question 2The debt to equity ratio measures the amount of debt a company uses has to finance its business for every dollar of equity it has. A higher debt to equity ratio implies that a company uses more debt than equity for financing. In this case, the debt to equity ratio for Pulaski Company is 0.72 which is less than 1 implying that the stockholder's equity exceeds the amount of debt borrowed. Thus Pulaski Company may not likely suffer from risks brought about by huge amount of debts in the capital structure. On the other hand, the debt to equity ratio of Scott Company is 1.2 which is greater than 1 implying that the debt exceeds the totalamount stockholders equity. Huge debts is associated with a lot of risks. First, there is the risk of defaulting whereby the company may be unable to repay its debt and therefore leading to bankruptcy. Second, a company may find it difficult to obtain additional funding from creditors.This is because the creditors prefer companies with low debt to equity ratio. Finally, there is the risks of violating the debt covenants. A covenant is an agreement that requires a company to maintain adequate financial ratio levels. Too much borrowings may violate this covenant. Since ScottCompany has a higher debt to equity ratio, it may experience these risks which may eventually lead to the company being declared bankrupt .
PROBLEM 14-6BProblem 14-6B: Gordon Enterprises Borrowings1. Total amount of each installment payment.Present value of an ordi.
Problem 13-3AThe stockholders’ equity accounts of Ashley Corpo.docxChantellPantoja184
Problem 13-3A
The stockholders’ equity accounts of Ashley Corporation on January 1, 2012, were as follows.
Preferred Stock (8%, $49 par, cumulative, 10,200 shares authorized)
$ 387,100
Common Stock ($1 stated value, 1,937,100 shares authorized)
1,408,700
Paid-in Capital in Excess of Par—Preferred Stock
123,200
Paid-in Capital in Excess of Stated Value—Common Stock
1,496,800
Retained Earnings
1,814,400
Treasury Stock (10,300 common shares)
51,500
During 2012, the corporation had the following transactions and events pertaining to its stockholders’ equity.
Feb. 1
Issued 24,100 shares of common stock for $123,900.
Apr. 14
Sold 6,000 shares of treasury stock—common for $33,800.
Sept. 3
Issued 5,100 shares of common stock for a patent valued at $35,700.
Nov. 10
Purchased 1,100 shares of common stock for the treasury at a cost of $5,700.
Dec. 31
Determined that net income for the year was $456,600.
No dividends were declared during the year.
(a)
Journalize the transactions and the closing entry for net income. (Credit account titles are automatically indented when amount is entered. Do not indent manually.)
Date
Account Titles and Explanation
Debit
Credit
Feb. 1
Apr. 14
Sept. 3
Nov. 10
Dec. 31
Click if you would like to Show Work for this question:
Open Show Work
LINK TO TEXT
LINK TO TEXT
LINK TO TEXT
LINK TO TEXT
LINK TO TEXT
.
Problem 12-9AYour answer is partially correct. Try again..docxChantellPantoja184
Problem 12-9A
Your answer is partially correct. Try again.
Condensed financial data of Odgers Inc. follow.
ODGERS INC.Comparative Balance Sheets
December 31
Assets
2014
2013
Cash
$ 131,704
$ 78,892
Accounts receivable
143,114
61,940
Inventory
183,375
167,646
Prepaid expenses
46,292
42,380
Long-term investments
224,940
177,670
Plant assets
464,550
395,275
Accumulated depreciation
(81,500
)
(84,760
)
Total
$1,112,475
$839,043
Liabilities and Stockholders’ Equity
Accounts payable
$ 166,260
$ 109,699
Accrued expenses payable
26,895
34,230
Bonds payable
179,300
237,980
Common stock
358,600
285,250
Retained earnings
381,420
171,884
Total
$1,112,475
$839,043
ODGERS INC.Income Statement Data
For the Year Ended December 31, 2014
Sales revenue
$633,190
Less:
Cost of goods sold
$220,800
Operating expenses, excluding depreciation
20,228
Depreciation expense
75,795
Income tax expense
44,466
Interest expense
7,710
Loss on disposal of plant assets
12,225
381,224
Net income
$ 251,966
Additional information:
1.
New plant assets costing $163,000 were purchased for cash during the year.
2.
Old plant assets having an original cost of $93,725 and accumulated depreciation of $79,055 were sold for $2,445 cash.
3.
Bonds payable matured and were paid off at face value for cash.
4.
A cash dividend of $42,430 was declared and paid during the year.
Prepare a statement of cash flows using the indirect method. (Show amounts that decrease cash flow with either a - sign e.g. -15,000 or in parenthesis e.g. (15,000).)
ODGERS INC.Statement of Cash Flows
For the Year Ended December 31, 2014
$
Adjustments to reconcile net income to
$
$
Problem 12-10A
Condensed financial data of Odgers Inc. follow.
ODGERS INC.Comparative Balance Sheets
December 31
Assets
2014
2013
Cash
$ 151,904
$ 90,992
Accounts receivable
165,064
71,440
Inventory
211,500
193,358
Prepaid expenses
53,392
48,880
Long-term investments
259,440
204,920
Plant assets
535,800
455,900
Accumulated depreciation
(94,000
)
(97,760
)
Total
$1,283,100
$967,730
Liabilities and Stockholders’ Equity
Accounts payable
$ 191,760
$ 126,524
Accrued expenses payable
31,020
39,480
Bonds payable
206,800
274,480
Common stock
413,600
329,000
Retained earnings
439,920
198,246
Total
$1,283,100
$967,730
ODGERS INC.Income Statement Data
For the Year Ended December 31, 2014
Sales revenue
$730,305
Less:
Cost of goods sold
$254,665
Operating expenses, excluding depreciation
23,331
Depreciation expense
87,420
Income taxes
51,286
Interest expense
8,892
Loss on disposal of plant assets
14,100
439,694
Net income
$ 290,611
Additional information:
1.
New plant assets costing $188,000 were purchased for c.
Problem 1123456Xf122437455763715813910106Name DateTopic.docxChantellPantoja184
Problem 1123456Xf122437455763715813910106
Name: Date:
Topic One: Mean, Variance, and Standard Deviation
Please type your answer in the cell beside the question.
5. The following is the heart rate for 10 randomly selected patients on the unit. Find the mean, variance, and standard deviation of the data using the descriptive statistics option in the data analysis toolpak.
75, 80, 62, 97, 107, 59, 76, 83, 84, 69
6. The following is a frequency distribution fo the number of times patience use the call light in a days time. X is the number of times the call light is used and f is the frequency (meaning the number of patients). Create a histogram of the data.
Sheet2
Sheet3
EXERCISE 11 USING STATISTICS TO DESCRIBE A STUDY SAMPLE
STATISTICAL TECHNIQUE IN REVIEW
Most studies describe the subjects that comprise the study sample. This description of the sample is called the sample characteristics which may be presented in a table or the narrative of the article. The sample characteristics are often presented for each of the groups in a study (i.e. experimental and control groups). Descriptive statistics are used to generate sample characteristics, and the type of statistic used depends on the level of measurement of the demographic variables included in a study (Burns & Grove, 2007). For example, measuring gender produces nominal level data that can be described using frequencies, percentages, and mode. Measuring educational level usually produces ordinal data that can be described using frequencies, percentages, mode, median, and range. Obtaining each subject's specific age is an example of ratio data that can be described using mean, range, and standard deviation. Interval and ratio data are analyzed with the same type of statistics and are usually referred to as interval/ratio level data in this text.
RESEARCH ARTICLE
Source: Troy, N. W., & Dalgas-Pelish, P. (2003). The effectiveness of a self-care intervention for the management of postpartum fatigue. Applied Nursing Research, 16 (1), 38–45.
Introduction
Troy and Dalgas-Pelish (2003) conducted a quasi-experimental study to determine the effectiveness of a self-care intervention (Tiredness Management Guide [TMG]) on postpartum fatigue. The study subjects included 68 primiparous mothers, who were randomly assigned to either the experimental group (32 subjects) or the control group (36 subjects) using a computer program. The results of the study indicated that the TMG was effective in reducing levels of morning postpartum fatigue from the 2nd to 4th weeks postpartum. These researchers recommend that “mothers need to be informed that they will probably experience postpartum fatigue and be taught to assess and manage this phenomenon” (Troy & Dalgas-Pelish, 2003, pp. 44-5).
Relevant Study Results
“A total of 80 women were initially enrolled [in the study] … twelve of these women dropped out of the study resulting in a final sample of 68.” (Troy & Dalgas-Pelish, 2003, p. 39). The researchers presen.
Problem 1. For the truss and loading shown below, calculate th.docxChantellPantoja184
Problem 1. For the truss and loading shown below, calculate the horizontal
displacement of point "D" using the method of virtual work. Show ALL your work!
HW No. 8 - Part 1
Solution
HW FA15 2 Page 1
Problem 1 Continued
Member L (in.) N (lb) N (in) NnL
HW No. 8 - Part 1
.
Problem 1 (30 marks)Review enough information about .docxChantellPantoja184
Problem 1 (30 marks)
Review enough information about Trinidad Drilling Ltd. to propose a vision and strategic objectives for the company. Develop a balanced scorecard that will help the company achieve this vision and monitor how well it is accomplishing its strategic objectives. Include a strategy map in table format that shows objectives and performance measures, with arrows illustrating hypothesized cause-and -effect relationships. Provide rationale for your strategy map. The body of your report should not exceed 1,000 words. Cite material you used to prepare the response and provide references in an appendix.
Problem 2 (20 marks)
Ajax Auto Upholstery Ltd. manufactures upholstered products for automobiles, vans, and trucks. Among the various Ajax plants around Canada is the Owlseye plant located in rural Alberta.
The chief financial officer has just received a report indicating that Ajax could purchase the entire annual output of the Owlseye plant from a foreign supplier for $37 million per year.
The budgeted operating costs (in thousands) for the Owlseye plant’s for the coming year is as follows:
Materials $15,000
Labor
Direct $12,000
Supervision 4,000
Indirect plant 5,000 19,000
Overhead
Depreciation – plant 6,000
Utilities, property tax, maintenance 2,000
Pension expense 4,500
Plant manager and staff 2,500
Corporate headquarters overhead allocation 3,000 18,000
Total budgeted costs $52,000
If material purchase orders are cancelled as a consequence of the plant closing, termination charges would amount to 10 percent of the annual cost of direct materials in the first year (zero thereafter).
A clause in the Ajax union contract requires the company to provide employment assistance to its former employees for 12 months after a plant closes. The estimated cost to administer this service if the Owlseye plant closes would be $2 million. $3.6 million of next year’s pension expense would continue indefinitely whether or not the plant remains open. About $900,000 of labour would still be required in the first year after closure to decommission the plant. After that, the plant would be sold for an estimated $1 million. Utilities, property taxes, and maintenance costs would remain unchanged in the first year after closure, but disappear when the plant is sold.
The plant manager and her staff would be somewhat affected by the closing of the Owlseye plant. Some managers would still be responsible for managing three other plants. As a result, total management salaries would be about 50% of the current level, starting at closure and remaining into the future.
Required:
Assume you are the company’s chief financial officer. Perform a five-year financial analysis and make a recommendation whether to close the Owlseye plant on this basis. Provide support for and cautions about your recommendation with organized, clearly-labeled data. Use bullet points where appropriate.
Problem 3 (16 marks)
Br.
Problem 1 (10 points) Note that an eigenvector cannot be zero.docxChantellPantoja184
Problem 1 (10 points): Note that an eigenvector cannot be zero, but an eigenvalue can
be 0. Suppose that 0 is an eigenvalue of A. What does it say about A? (Hint: One of the
most important properties of a matrix is whether or not it is invertible. Think about the
Invertible Matrix Theorem and all the ‘good things’ of dealing with invertible matrices)
Problem 5: (20 points): The figure below shows a network of one-way streets with
traffic flowing in the directions indicated. The flow rate along the streets are measured
as the average number of vehicles per hour.
a) Set up a mathematical model whose solution provides the unknown flow rates
b) Solve the model for the unknown flow rates
c) If the flow rates along the road A to B must be reduced for construction, what is
the minimum flow that is required to keep traffic flowing on all roads?
Problem 6 (20 points): Problem 7 (9 points): Prove that if A and B are matrices of the same
size, then tr(A+B)=tr(A)+tr(B)
Given:
Goal:
Proof:
Problem 7 (20 points)*: In the 1990, the northern spotted owl became the center of a
nationwide controversy over the use and misuse of the majestic forests in the Pacific
Northwest. Environmentalists convinced the federal government that the owl was
threatened with extinction if logging continued in the old-growth forests (with trees over
200 years old), where the owls prefer to live. The timber industry, anticipating the loss of
30,000 to 100,000 jobs as a result of new government restrictions on logging, argued that
the owl should not be classified as a “threatened species” and cited a number of published
scientific reports to support its case.
Caught in the crossfire of the two lobbying groups, mathematical ecologists
intensified their drive to understand the population dynamics of the spotted owl. The life
cycle of a spotted owl divides naturally into three stages: juvenile (up to 1 year old),
subadult (1 to 2 years), and adult (over 2 years). The owls mate for life during the subadult
and adult stages, begin to breed as adults, and live for up to 20 years. Each owl pair
requires about 1,000 hectares (4 square miles) for its own home territory. A critical time in
the life cycle is when the juveniles leave the nest. To survive and become a subadult, a
juvenile must successfully find a new home range (and usually a mate).
A first step in studying the population dynamics is to model the population at yearly
intervals, at times denoted by 𝑘𝑘 = 0,1,2, …. Usually, one assumes that there is a 1:1 ratio of
males to females in each life stage and counts only the females. The population at year 𝑘𝑘
can be described by a vector 𝒙𝒙𝒌𝒌 = (𝑗𝑗𝑘𝑘 , 𝑠𝑠𝑘𝑘 , 𝑎𝑎𝑘𝑘 ), where 𝑗𝑗𝑘𝑘 , 𝑠𝑠𝑘𝑘 , and 𝑎𝑎𝑘𝑘 are the numbers of
females in the juvenile, subadult, and adult stages, respectively. Using actual field data from
demographic studies, a rese
Probation and Parole 3Running head Probation and Parole.docxChantellPantoja184
Probation and Parole 3
Running head: Probation and Parole
Probation and Parole
Student Name
Allied American University
Author Note
This paper was prepared for Probation and Parole, Module 8 Check Your Understanding taught by [INSERT INSTRUCTOR’S NAME].
Directions: Respond to the following questions using complete sentences. Your answer should be at least 1 paragraph in length, which must be composed of three to five sentences.
1. What is meant by intermediate punishments and what programs are included in this category?
2. How do intermediate punishments serve to keep down prison populations?
3. Why has electronic monitoring proven so popular?
4. What is meant by shock probation/parole?
5. What are the essential features of the boot camp program?
6. Why has intensive supervision been a public relations success?
7. What are the criticisms of boot camp programs?
8. What has research revealed with respect to intensive supervision?
9. What are the criticisms of electronic monitoring in probation and parole?
10. What are the criticisms leveled at intensive supervision?
11. What are the purposes of and services offered by a day reporting center?
12. Why would heroin addicts who have no intention of giving up drug use voluntarily enter a drug treatment program? What are the advantages of using methadone to treat heroin addicts?
13. Why is behavior modification difficult to use in treating drug abusers?
14. What are the characteristics of chemical dependency (CD) programs?
15. What are the primary characteristics of the therapeutic community (TC) approach for treating drug abusers?
16. What are criticisms of the Alcoholics Anonymous approach?
17. What are the problems inherent in drug testing?
18. What are the typical characteristics of sex offenders? How have sex offender laws affected P/P supervision?
19. What are the pros and cons of restitution and charging offenders fees in probation or parole?
20. What are the problems encountered in using the interstate compact?
.
Problem 1(a) Complete the following ANOVA table based on 20 obs.docxChantellPantoja184
Problem 1:
(a) Complete the following ANOVA table based on 20 observations for the regression equation
(a) Is the overall regression significant? Fill in the missing values in the table.
Source DF SS MS F
Regression ___ 350 ____ ____
Error ___ _____
Total 500
(b) Suppose that you have computed the following sequential sums of squares due to regression:
Regressor Variables in Model SS Regression
………………………………………. 300
……………………………………… 250
…………………………………….. 340
……………………………………. 325
Fill in the missing values in the following “computer output”:
Source DF Partial SS F-value Pr>F
……………………………………………………………………………………….. 0.1245
………………………………………………………………………………………. 0.3841
………………………………………………………………………………………. 0.0042
………………………………………………………………………………………. 0.0401
Problem 2:
The time required for a merchandise to stock a grocery store shelf with a soft drink product as well as the number of cases of product stocked are given below. Consider a linear regression of delivery time against number of cases.
X=number of cases
Y=delivery time
Delivery time number of cases Hat diagonals
1.41 4 0.5077
2.96 6 0.3907
6.04 14 0.2013
7.57 19 0.3092
9.38 24 0.5912
Observations used L.S. Model
4,6,14,19,24
6,14,19,24
4,14,19,24
4,14,19,24
4,6,14,24
4,6,14,19
(a)
Calculate the PRESS statistic for the model .
(b) Calculate the regular residual for the model above. Then, compare these residuals with the PRESS residuals for this model.
Exercises from the Text
Use SAS whenever possible to do these exercises:
# 3.4 on p 122
# 3.5
# 3.8
# 3.15
# 3.21
# 3.27
# 3.28
# 3.31
# 3.38
# 3.39
Example with SAS on Sequential and Partial Sum of Squares
Data Weather;
Title 'Lows and Highs from N&O Jan 28,29,30 1992';
Title2 'using actual numbers (yesterday values)';
input city $ hi2 lo2 yhi ylo thi tlo;
* Mon Tues Wed ;
cards;
seattle 51 44 52 44 59 47
.
.
.
;
proc reg; model thi = yhi hi2 tlo ylo lo2/ss1 ss2;
test tlo=0, ylo=0, lo2=0;
/*-----------------------------------------------
| Showing sequential and partial sums of squares|
| Note t**2 = F relationship for partial F. By |
| hand, construct F to leave out .
Probe 140 SPrecipitation in inchesTemperature in F.docxChantellPantoja184
Probe 1
40 S
Precipitation in inches
Temperature in F
J F M A M J J A S O N D
2
4
6
8
10
12
0
10
20
30
40
50
60
70
80
90
POTET 26.8
Precip 27.1
MAT(F) 59.8
Probe 2
6 S
Precipitation in inches
Temperature in F
J F M A M J J A S O N D
2
4
6
8
10
12
0
10
20
30
40
50
60
70
80
90
POTET 69.2
Precip 124.6
MAT(F) 77.9
Probe 3
57 S
Precipitation in inches
Temperature in F
J F M A M J J A S O N D
2
4
6
8
10
12
0
10
20
30
40
50
60
70
80
90
POTET 21.5
Precip 38.7
MAT(F) 43.5
Probe 4
38 N
Precipitation in inches
Temperature in F
J F M A M J J A S O N D
2
4
6
8
10
12
0
10
20
30
40
50
60
70
80
90
POTET 30.3
Precip 16.5
MAT(F) 53.6
Probe 5
55 N
Precipitation in inches
Temperature in F
J F M A M J J A S O N D
2
4
6
8
10
12
0
10
20
30
40
50
60
70
80
90
POTET 21.3
Precip 28.1
MAT(F) 40.6
Probe 6
43 N
Precipitation in inches
Temperature in F
J F M A M J J A S O N D
2
4
6
8
10
12
0
10
20
30
40
50
60
70
80
90
POTET 25.4
Precip 14.4
MAT(F) 47.2
Probe 7
42 N
Precipitation in inches
Temperature in F
J F M A M J J A S O N D
2
4
6
8
10
12
0
10
20
30
40
50
60
70
80
90
POTET 17.3
Precip 31.2
MAT(F) 26.0
Probe 8
42 N
Precipitation in inches
Temperature in F
J F M A M J J A S O N D
2
4
6
8
10
12
0
10
20
30
40
50
60
70
80
90
POTET 29.6
Precip 38.8
MAT(F) 51.6
Probe 9
18 S
Precipitation in inches
Temperature in F
J F M A M J J A S O N D
2
4
6
8
10
12
0
10
20
30
40
50
60
70
80
90
POTET 66.1
Precip 74.8
MAT(F) 77.7
Probe 10
58 N
Precipitation in inches
Temperature in F
J F M A M J J A S O N D
2
4
6
8
10
12
0
10
20
30
40
50
60
70
80
90
POTET 16.5
Precip 24.8
MAT(F) 36.9
Probe 11
26 N
Precipitation in inches
Temperature in F
J F M A M J J A S O N D
2
4
6
8
10
12
0
10
20
30
40
50
60
70
80
90
POTET 47.6
Precip 3.8
MAT(F) 70.1
Probe 12
29 N
Precipitation in inches
Temperature in F
J F M A M J J A S O N D
2
4
6
8
10
12
0
10
20
30
40
50
60
70
80
90
POTET 44.0
Precip 47.3
MAT(F) 63.2
Probe 4
Probe 2
Probe 10
Probe 5
Probe 6
Probe 7
Probe 11
Probe 12
Probe 8
Probe 9
Probe 3
Probe 1
Map 1
20 N
40 N
60 N
80 N
0
20 S
40 S
60 S
0
1000
miles
Geography 204
Koppen Climate Classification Guidelines
If POTET exceeds Precip then B
BW = POTET more than 2x Precip
(desert)
h = mean annual temp > 18 C (64.4 F)
k = mean annual temp < 18 C (64.4 F)
BS = POTET less than 2x Precip
(steppe)
h = mean annual t.
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumMJDuyan
(𝐓𝐋𝐄 𝟏𝟎𝟎) (𝐋𝐞𝐬𝐬𝐨𝐧 𝟏)-𝐏𝐫𝐞𝐥𝐢𝐦𝐬
𝐃𝐢𝐬𝐜𝐮𝐬𝐬 𝐭𝐡𝐞 𝐄𝐏𝐏 𝐂𝐮𝐫𝐫𝐢𝐜𝐮𝐥𝐮𝐦 𝐢𝐧 𝐭𝐡𝐞 𝐏𝐡𝐢𝐥𝐢𝐩𝐩𝐢𝐧𝐞𝐬:
- Understand the goals and objectives of the Edukasyong Pantahanan at Pangkabuhayan (EPP) curriculum, recognizing its importance in fostering practical life skills and values among students. Students will also be able to identify the key components and subjects covered, such as agriculture, home economics, industrial arts, and information and communication technology.
𝐄𝐱𝐩𝐥𝐚𝐢𝐧 𝐭𝐡𝐞 𝐍𝐚𝐭𝐮𝐫𝐞 𝐚𝐧𝐝 𝐒𝐜𝐨𝐩𝐞 𝐨𝐟 𝐚𝐧 𝐄𝐧𝐭𝐫𝐞𝐩𝐫𝐞𝐧𝐞𝐮𝐫:
-Define entrepreneurship, distinguishing it from general business activities by emphasizing its focus on innovation, risk-taking, and value creation. Students will describe the characteristics and traits of successful entrepreneurs, including their roles and responsibilities, and discuss the broader economic and social impacts of entrepreneurial activities on both local and global scales.
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...TechSoup
Whether you're new to SEO or looking to refine your existing strategies, this webinar will provide you with actionable insights and practical tips to elevate your nonprofit's online presence.
How Barcodes Can Be Leveraged Within Odoo 17Celine George
In this presentation, we will explore how barcodes can be leveraged within Odoo 17 to streamline our manufacturing processes. We will cover the configuration steps, how to utilize barcodes in different manufacturing scenarios, and the overall benefits of implementing this technology.
Leveraging Generative AI to Drive Nonprofit InnovationTechSoup
In this webinar, participants learned how to utilize Generative AI to streamline operations and elevate member engagement. Amazon Web Service experts provided a customer specific use cases and dived into low/no-code tools that are quick and easy to deploy through Amazon Web Service (AWS.)
Temple of Asclepius in Thrace. Excavation resultsKrassimira Luka
The temple and the sanctuary around were dedicated to Asklepios Zmidrenus. This name has been known since 1875 when an inscription dedicated to him was discovered in Rome. The inscription is dated in 227 AD and was left by soldiers originating from the city of Philippopolis (modern Plovdiv).
This presentation was provided by Rebecca Benner, Ph.D., of the American Society of Anesthesiologists, for the second session of NISO's 2024 Training Series "DEIA in the Scholarly Landscape." Session Two: 'Expanding Pathways to Publishing Careers,' was held June 13, 2024.
This presentation was provided by Racquel Jemison, Ph.D., Christina MacLaughlin, Ph.D., and Paulomi Majumder. Ph.D., all of the American Chemical Society, for the second session of NISO's 2024 Training Series "DEIA in the Scholarly Landscape." Session Two: 'Expanding Pathways to Publishing Careers,' was held June 13, 2024.
2. # The hook should exit with non-zero status after issuing an
# appropriate message if it wants to stop the commit. The hook
is
# allowed to edit the commit message file.
#
# To enable this hook, rename this file to "applypatch-msg".
. git-sh-setup
test -x "$GIT_DIR/hooks/commit-msg" &&
exec "$GIT_DIR/hooks/commit-msg"
${1+"[email protected]"}
:
PrizeExample/.git/hooks/commit-msg.sample
#!/bin/sh
#
# An example hook script to check the commit log message.
# Called by "git commit" with one argument, the name of the
file
# that has the commit message. The hook should exit with non-
zero
# status after issuing an appropriate message if it wants to stop
the
# commit. The hook is allowed to edit the commit message file.
#
# To enable this hook, rename this file to "commit-msg".
# Uncomment the below to add a Signed-off-by line to the
message.
# Doing this in a hook is a bad idea in general, but the prepare-
commit-msg
# hook is more suited to it.
#
# SOB=$(git var GIT_AUTHOR_IDENT | sed -n
's/^(.*>).*$/Signed-off-by: 1/p')
3. # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
# This example catches duplicate Signed-off-by lines.
test "" = "$(grep '^Signed-off-by: ' "$1" |
sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
echo >&2 Duplicate Signed-off-by lines.
exit 1
}
PrizeExample/.git/hooks/post-update.sample
#!/bin/sh
#
# An example hook script to prepare a packed repository for use
over
# dumb transports.
#
# To enable this hook, rename this file to "post-update".
exec git update-server-info
PrizeExample/.git/hooks/pre-applypatch.sample
#!/bin/sh
#
# An example hook script to verify what is about to be
committed
# by applypatch from an e-mail message.
#
# The hook should exit with non-zero status after issuing an
# appropriate message if it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-applypatch".
. git-sh-setup
4. test -x "$GIT_DIR/hooks/pre-commit" &&
exec "$GIT_DIR/hooks/pre-commit"
${1+"[email protected]"}
:
PrizeExample/.git/hooks/pre-commit.sample
#!/bin/sh
#
# An example hook script to verify what is about to be
committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message
if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
fi
# If you want to allow non-ascii filenames set this variable to
true.
allownonascii=$(git config hooks.allownonascii)
# Redirect output to stderr.
exec 1>&2
# Cross platform projects tend to avoid non-ascii filenames;
prevent
# them from being added to the repository. We exploit the fact
5. that the
# printable range starts at the space character and ends with
tilde.
if [ "$allownonascii" != "true" ] &&
# Note that the use of brackets around a tr range is ok here,
(it's
# even required, for portability to Solaris 10's /usr/bin/tr),
since
# the square bracket bytes happen to fall in the designated
range.
test $(git diff --cached --name-only --diff-filter=A -z
$against |
LC_ALL=C tr -d '[ -~]0' | wc -c) != 0
then
echo "Error: Attempt to add a non-ascii file name."
echo
echo "This can cause problems if you want to work"
echo "with people on other platforms."
echo
echo "To be portable it is advisable to rename the file ..."
echo
echo "If you know what you are doing you can disable
this"
echo "check using:"
echo
echo " git config hooks.allownonascii true"
echo
exit 1
fi
# If there are whitespace errors, print the offending file names
and fail.
exec git diff-index --check --cached $against --
PrizeExample/.git/hooks/pre-rebase.sample
6. #!/bin/sh
#
# Copyright (c) 2006, 2008 Junio C Hamano
#
# The "pre-rebase" hook is run just before "git rebase" starts
doing
# its job, and can prevent the command from running by exiting
with
# non-zero status.
#
# The hook is called with the following parameters:
#
# $1 -- the upstream the series was forked from.
# $2 -- the branch being rebased (or empty when rebasing the
current branch).
#
# This sample shows how to prevent topic branches that are
already
# merged to 'next' branch from getting rebased, because
allowing it
# would result in rebasing already published history.
publish=next
basebranch="$1"
if test "$#" = 2
then
topic="refs/heads/$2"
else
topic=`git symbolic-ref HEAD` ||
exit 0 ;# we do not interrupt rebasing detached HEAD
fi
case "$topic" in
refs/heads/??/*)
;;
*)
7. exit 0 ;# we do not interrupt others.
;;
esac
# Now we are dealing with a topic branch being rebased
# on top of master. Is it OK to rebase it?
# Does the topic really exist?
git show-ref -q "$topic" || {
echo >&2 "No such branch $topic"
exit 1
}
# Is topic fully merged to master?
not_in_master=`git rev-list --pretty=oneline ^master "$topic"`
if test -z "$not_in_master"
then
echo >&2 "$topic is fully merged to master; better remove
it."
exit 1 ;# we could allow it, but there is no point.
fi
# Is topic ever merged to next? If so you should not be rebasing
it.
only_next_1=`git rev-list ^master "^$topic" ${publish} | sort`
only_next_2=`git rev-list ^master ${publish} | sort`
if test "$only_next_1" = "$only_next_2"
then
not_in_topic=`git rev-list "^$topic" master`
if test -z "$not_in_topic"
then
echo >&2 "$topic is already up-to-date with master"
exit 1 ;# we could allow it, but there is no point.
else
exit 0
fi
8. else
not_in_next=`git rev-list --pretty=oneline ^${publish}
"$topic"`
/usr/bin/perl -e '
my $topic = $ARGV[0];
my $msg = "* $topic has commits already merged to
public branch:n";
my (%not_in_next) = map {
/^([0-9a-f]+) /;
($1 => 1);
} split(/n/, $ARGV[1]);
for my $elem (map {
/^([0-9a-f]+) (.*)$/;
[$1 => $2];
} split(/n/, $ARGV[2])) {
if (!exists $not_in_next{$elem->[0]}) {
if ($msg) {
print STDERR $msg;
undef $msg;
}
print STDERR " $elem->[1]n";
}
}
' "$topic" "$not_in_next" "$not_in_master"
exit 1
fi
exit 0
#####################################################
###########
This sample hook safeguards topic branches that have been
published from being rewound.
The workflow assumed here is:
9. * Once a topic branch forks from "master", "master" is never
merged into it again (either directly or indirectly).
* Once a topic branch is fully cooked and merged into
"master",
it is deleted. If you need to build on top of it to correct
earlier mistakes, a new topic branch is created by forking at
the tip of the "master". This is not strictly necessary, but
it makes it easier to keep your history simple.
* Whenever you need to test or publish your changes to topic
branches, merge them into "next" branch.
The script, being an example, hardcodes the publish branch
name
to be "next", but it is trivial to make it configurable via
$GIT_DIR/config mechanism.
With this workflow, you would want to know:
(1) ... if a topic branch has ever been merged to "next". Young
topic branches can have stupid mistakes you would rather
clean up before publishing, and things that have not been
merged into other branches can be easily rebased without
affecting other people. But once it is published, you would
not want to rewind it.
(2) ... if a topic branch has been fully merged to "master".
Then you can delete it. More importantly, you should not
build on top of it -- other people may already want to
change things related to the topic as patches against your
"master", so if you need further changes, it is better to
fork the topic (perhaps with the same name) afresh from the
tip of "master".
10. Let's look at this example:
o---o---o---o---o---o---o---o---o---o "next"
/ / / /
/ a---a---b A / /
/ / / /
/ / c---c---c---c B /
/ / / /
/ / / b---b C /
/ / / / /
---o---o---o---o---o---o---o---o---o---o---o "master"
A, B and C are topic branches.
* A has one fix since it was merged up to "next".
* B has finished. It has been fully merged up to "master" and
"next",
and is ready to be deleted.
* C has not merged to "next" at all.
We would want to allow C to be rebased, refuse A, and
encourage
B to be deleted.
To compute (1):
git rev-list ^master ^topic next
git rev-list ^master next
if these match, topic has not merged in next at all.
To compute (2):
11. git rev-list master..topic
if this is empty, it is fully merged to "master".
PrizeExample/.git/hooks/prepare-commit-msg.sample
#!/bin/sh
#
# An example hook script to prepare the commit log message.
# Called by "git commit" with the name of the file that has the
# commit message, followed by the description of the commit
# message's source. The hook's purpose is to edit the commit
# message file. If the hook fails with a non-zero status,
# the commit is aborted.
#
# To enable this hook, rename this file to "prepare-commit-
msg".
# This hook includes three examples. The first comments out
the
# "Conflicts:" part of a merge commit.
#
# The second includes the output of "git diff --name-status -r"
# into the message, just before the "git status" output. It is
# commented because it doesn't cope with --amend or with
squashed
# commits.
#
# The third example adds a Signed-off-by line to the message,
that can
# still be edited. This is rarely a good idea.
case "$2,$3" in
merge,)
/usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/;
print' "$1" ;;
12. # ,|template,)
# /usr/bin/perl -i.bak -pe '
# print "n" . `git diff --cached --name-status -r`
# if /^#/ && $first++ == 0' "$1" ;;
*) ;;
esac
# SOB=$(git var GIT_AUTHOR_IDENT | sed -n
's/^(.*>).*$/Signed-off-by: 1/p')
# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
PrizeExample/.git/hooks/update.sample
#!/bin/sh
#
# An example hook script to blocks unannotated tags from
entering.
# Called by "git receive-pack" with arguments: refname sha1-
old sha1-new
#
# To enable this hook, rename this file to "update".
#
# Config
# ------
# hooks.allowunannotated
# This boolean sets whether unannotated tags will be allowed
into the
# repository. By default they won't be.
# hooks.allowdeletetag
# This boolean sets whether deleting tags will be allowed in
the
# repository. By default they won't be.
# hooks.allowmodifytag
# This boolean sets whether a tag may be modified after
13. creation. By default
# it won't be.
# hooks.allowdeletebranch
# This boolean sets whether deleting branches will be allowed
in the
# repository. By default they won't be.
# hooks.denycreatebranch
# This boolean sets whether remotely creating branches will be
denied
# in the repository. By default this is allowed.
#
# --- Command line
refname="$1"
oldrev="$2"
newrev="$3"
# --- Safety check
if [ -z "$GIT_DIR" ]; then
echo "Don't run this script from the command line." >&2
echo " (if you want, you could supply GIT_DIR then run"
>&2
echo " $0 <ref> <oldrev> <newrev>)" >&2
exit 1
fi
if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
echo "Usage: $0 <ref> <oldrev> <newrev>" >&2
exit 1
fi
# --- Config
allowunannotated=$(git config --bool hooks.allowunannotated)
allowdeletebranch=$(git config --bool hooks.allowdeletebranch)
denycreatebranch=$(git config --bool hooks.denycreatebranch)
allowdeletetag=$(git config --bool hooks.allowdeletetag)
14. allowmodifytag=$(git config --bool hooks.allowmodifytag)
# check for no description
projectdesc=$(sed -e '1q' "$GIT_DIR/description")
case "$projectdesc" in
"Unnamed repository"* | "")
echo "*** Project description file hasn't been set" >&2
exit 1
;;
esac
# --- Check types
# if $newrev is 0000...0000, it's a commit to delete a ref.
zero="0000000000000000000000000000000000000000"
if [ "$newrev" = "$zero" ]; then
newrev_type=delete
else
newrev_type=$(git cat-file -t $newrev)
fi
case "$refname","$newrev_type" in
refs/tags/*,commit)
# un-annotated tag
short_refname=${refname##refs/tags/}
if [ "$allowunannotated" != "true" ]; then
echo "*** The un-annotated tag,
$short_refname, is not allowed in this repository" >&2
echo "*** Use 'git tag [ -a | -s ]' for tags you
want to propagate." >&2
exit 1
fi
;;
refs/tags/*,delete)
# delete tag
if [ "$allowdeletetag" != "true" ]; then
echo "*** Deleting a tag is not allowed in this
15. repository" >&2
exit 1
fi
;;
refs/tags/*,tag)
# annotated tag
if [ "$allowmodifytag" != "true" ] && git rev-parse
$refname > /dev/null 2>&1
then
echo "*** Tag '$refname' already exists." >&2
echo "*** Modifying a tag is not allowed in this
repository." >&2
exit 1
fi
;;
refs/heads/*,commit)
# branch
if [ "$oldrev" = "$zero" -a "$denycreatebranch" =
"true" ]; then
echo "*** Creating a branch is not allowed in
this repository" >&2
exit 1
fi
;;
refs/heads/*,delete)
# delete branch
if [ "$allowdeletebranch" != "true" ]; then
echo "*** Deleting a branch is not allowed in
this repository" >&2
exit 1
fi
;;
refs/remotes/*,commit)
# tracking branch
;;
refs/remotes/*,delete)
16. # delete tracking branch
if [ "$allowdeletebranch" != "true" ]; then
echo "*** Deleting a tracking branch is not
allowed in this repository" >&2
exit 1
fi
;;
*)
# Anything else (is there anything else?)
echo "*** Update hook: unknown type of update to
ref $refname of type $newrev_type" >&2
exit 1
;;
esac
# --- Finished
exit 0
PrizeExample/.git/index
PrizeExample/.git/info/exclude
.DS_Store
UserInterface.xcuserstate
__MACOSX/PrizeExample/.git/info/._exclude
PrizeExample/.git/logs/HEAD
0000000000000000000000000000000000000000
1b22d78d425bcdab7f2280ef764d390b541ab3fb Kevin Sahr
<[email protected]> 1358207680 -0800 commit (initial):
Initial Commit
PrizeExample/.git/logs/refs/heads/master
0000000000000000000000000000000000000000
17. 1b22d78d425bcdab7f2280ef764d390b541ab3fb Kevin Sahr
<[email protected]> 1358207680 -0800 commit (initial):
Initial Commit
PrizeExample/.git/objects/1b/22d78d425bcdab7f2280ef764d390
b541ab3fb
PrizeExample/.git/objects/1b/22d78d425bcdab7f2280ef764d390
b541ab3fb
commit 185�tree
35d55eb67bdfb12cbe860d3db52958794681d62c
author Kevin Sahr <[email protected]> 1358207680 -0800
committer Kevin Sahr <[email protected]> 1358207680 -0800
Initial Commit
PrizeExample/.git/objects/35/d55eb67bdfb12cbe860d3db529587
94681d62c
PrizeExample/.git/objects/35/d55eb67bdfb12cbe860d3db529587
94681d62c
PrizeExample/.git/objects/3a/b1d767f07c83b809b07dd72fcbfd0
123166deb
PrizeExample/.git/objects/3a/b1d767f07c83b809b07dd72fcbfd0
123166deb
blob 180�//
// Prize.m
// PrizeExample
//
// Created by Kevin Sahr on 1/14/13.
// Copyright (c) 2013 Kevin Sahr. All rights reserved.
//
#import "Prize.h"
19. PrizeExample/.git/objects/75/90ab9b291c1261947150dc266324b
57bed28f5
PrizeExample/.git/objects/75/90ab9b291c1261947150dc266324b
57bed28f5
blob 202�//
// Prize.h
// PrizeExample
//
// Created by Kevin Sahr on 1/14/13.
// Copyright (c) 2013 Kevin Sahr. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface Prize : NSObject
@end
PrizeExample/.git/objects/89/5ee117fe83ae9655f6124745778b8
ed670e29a
PrizeExample/.git/objects/89/5ee117fe83ae9655f6124745778b8
ed670e29a
blob 3130�."Modified from man(1) of FreeBSD, the NetBSD
mdoc.template, and mdoc.samples.
."See Also:
."man mdoc.samples for a complete listing of options
."man mdoc for the short list of editing options
."/usr/share/misc/mdoc.template
20. .Dd 1/14/13 " DATE
.Dt PrizeExample 1 " Program name and manual section
number
.Os Darwin
.Sh NAME " Section Header - required - don't
modify
.Nm PrizeExample,
." The following lines are read in generating the apropos(man -
k) database. Use only key
." words here as the database is built based on the words here
and in the .ND line.
.Nm Other_name_for_same_program(),
.Nm Yet another name for the same program.
." Use .Nm macro to designate other names for the documented
program.
.Nd This line parsed for whatis database.
.Sh SYNOPSIS " Section Header - required - don't
modify
.Nm
.Op Fl abcd " [-abcd]
.Op Fl a Ar path " [-a path]
21. .Op Ar file " [file]
.Op Ar " [file ...]
.Ar arg0 " Underlined argument - use .Ar anywhere
to underline
arg2 ... " Arguments
.Sh DESCRIPTION " Section Header - required - don't
modify
Use the .Nm macro to refer to your program throughout the man
page like such:
.Nm
Underlining is accomplished with the .Ar macro like this:
.Ar underlined text .
.Pp " Inserts a space
A list of items with descriptions:
.Bl -tag -width -indent " Begins a tagged list
.It item a " Each item preceded by .It macro
Description of item a
.It item b
Description of item b
.El " Ends the list
22. .Pp
A list of flags and their descriptions:
.Bl -tag -width -indent " Differs from above in tag removed
.It Fl a "-a flag as a list item
Description of -a flag
.It Fl b
Description of -b flag
.El " Ends the list
.Pp
." .Sh ENVIRONMENT " May not be needed
." .Bl -tag -width "ENV_VAR_1" -indent " ENV_VAR_1 is
width of the string ENV_VAR_1
." .It Ev ENV_VAR_1
." Description of ENV_VAR_1
." .It Ev ENV_VAR_2
." Description of ENV_VAR_2
." .El
.Sh FILES " File used or created by the topic of the
man page
23. .Bl -tag -width "/Users/joeuser/Library/really_long_file_name"
-compact
.It Pa /usr/share/file_name
FILE_1 description
.It Pa /Users/joeuser/Library/really_long_file_name
FILE_2 description
.El " Ends the list
." .Sh DIAGNOSTICS " May not be needed
." .Bl -diag
." .It Diagnostic Tag
." Diagnostic informtion here.
." .It Diagnostic Tag
." Diagnostic informtion here.
." .El
.Sh SEE ALSO
." List links in ascending order by section, alphabetically
within a section.
." Please do not reference files that do not exist without filing a
bug report
24. .Xr a 1 ,
.Xr b 1 ,
.Xr c 1 ,
.Xr a 2 ,
.Xr b 2 ,
.Xr a 3 ,
.Xr b 3
." .Sh BUGS " Document known, unremedied bugs
." .Sh HISTORY " Document history if command
behaves in a unique manner
PrizeExample/.git/objects/b6/5acc40fad073706e32c8335f4a5488
c13b1269
PrizeExample/.git/objects/b6/5acc40fad073706e32c8335f4a5488
c13b1269
blob 8207�// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
26CAE27C16A4D240001F4178 /*
Foundation.framework in Frameworks */ = {isa =
PBXBuildFile; fileRef = 26CAE27B16A4D240001F4178 /*
Foundation.framework */; };
38. // Prefix header for all source files of the 'PrizeExample' target
in the 'PrizeExample' project
//
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#endif
__MACOSX/PrizeExample/PrizeExample/._PrizeExample-
Prefix.pch
PrizeExample/PrizeExample/PrizeExample.1
."Modified from man(1) of FreeBSD, the NetBSD
mdoc.template, and mdoc.samples.
."See Also:
."man mdoc.samples for a complete listing of options
."man mdoc for the short list of editing options
."/usr/share/misc/mdoc.template
.Dd 1/14/13 " DATE
.Dt PrizeExample 1 " Program name and manual section
number
.Os Darwin
.Sh NAME " Section Header - required - don't
modify
.Nm PrizeExample,
39. ." The following lines are read in generating the apropos(man -
k) database. Use only key
." words here as the database is built based on the words here
and in the .ND line.
.Nm Other_name_for_same_program(),
.Nm Yet another name for the same program.
." Use .Nm macro to designate other names for the documented
program.
.Nd This line parsed for whatis database.
.Sh SYNOPSIS " Section Header - required - don't
modify
.Nm
.Op Fl abcd " [-abcd]
.Op Fl a Ar path " [-a path]
.Op Ar file " [file]
.Op Ar " [file ...]
.Ar arg0 " Underlined argument - use .Ar anywhere
to underline
arg2 ... " Arguments
.Sh DESCRIPTION " Section Header - required - don't
modify
40. Use the .Nm macro to refer to your program throughout the man
page like such:
.Nm
Underlining is accomplished with the .Ar macro like this:
.Ar underlined text .
.Pp " Inserts a space
A list of items with descriptions:
.Bl -tag -width -indent " Begins a tagged list
.It item a " Each item preceded by .It macro
Description of item a
.It item b
Description of item b
.El " Ends the list
.Pp
A list of flags and their descriptions:
.Bl -tag -width -indent " Differs from above in tag removed
.It Fl a "-a flag as a list item
Description of -a flag
.It Fl b
41. Description of -b flag
.El " Ends the list
.Pp
." .Sh ENVIRONMENT " May not be needed
." .Bl -tag -width "ENV_VAR_1" -indent " ENV_VAR_1 is
width of the string ENV_VAR_1
." .It Ev ENV_VAR_1
." Description of ENV_VAR_1
." .It Ev ENV_VAR_2
." Description of ENV_VAR_2
." .El
.Sh FILES " File used or created by the topic of the
man page
.Bl -tag -width "/Users/joeuser/Library/really_long_file_name"
-compact
.It Pa /usr/share/file_name
FILE_1 description
.It Pa /Users/joeuser/Library/really_long_file_name
FILE_2 description
42. .El " Ends the list
." .Sh DIAGNOSTICS " May not be needed
." .Bl -diag
." .It Diagnostic Tag
." Diagnostic informtion here.
." .It Diagnostic Tag
." Diagnostic informtion here.
." .El
.Sh SEE ALSO
." List links in ascending order by section, alphabetically
within a section.
." Please do not reference files that do not exist without filing a
bug report
.Xr a 1 ,
.Xr b 1 ,
.Xr c 1 ,
.Xr a 2 ,
.Xr b 2 ,
.Xr a 3 ,
54. __MACOSX/PrizeExample/._PrizeExample.xcodeproj
CS356 Lab 2: Creating Classes
Complete the following steps in order. Use only messages and
functions discussed in class.
1. Follow Lab 1 steps 1-6 to create a new project named lab02.
Use the same project template as
specified in Lab 1 (i.e., OS X-Application-Command Line
Tool).
2. Now create an empty Prize class by doing the following:
a. Select the lab02 folder (which contains the file main.m) on
the left hand side of the Xcode
window.
b. Choose New-File from the File menu. In the dialog box
choose Source from beneath OS
X, then choose Cocoa Class. Then click Next.
c. In the dialogue box that appears enter Prize for the Class.
Make sure the Subclass of is set
to NSObject. Then click Next. You will be prompted for the
location to create the new file; put
the new file inside the lab02 folder inside your project folder
(note that the folder/file
organization that appears along the left-hand side of the Xcode
window need not necessarily
correspond to the way files are actually organized in your
directories).
55. 3. Enter the code from Prize.h, Prize.m, and main.m that was
handed out in class into the
corresponding files. I highly recommend taking the few minutes
that it will take to actually type
this code in, rather than using copy-and-paste (from which you
will learn nothing). Make sure
the program builds and runs before proceeding.
4. Add a method with the following declaration to your Prize
class:
- (NSString*) valueString
This method should return the string “free” if the price of the
object is 0.0, “inexpensive” if the
price is greater than 0.0 but less than 1000.00, and “expensive”
otherwise. I would recommend
testing this method (and each method below) before continuing,
by experimenting with sending
the message to a Prize object in main.m.
5. Add a method with the following declaration to your Prize
class:
- (BOOL)isBetterThan:(Prize*) prize
This method should return YES if the current object (self) has a
price greater-than-or-equal-to
the passed-in prize, and NO if it does not.
7. Add two instance variables to the Prize class, a string
manufacturer and an integer year
(representing the year the prize was manufactured). Use
properties to define these instance
variables along with their setters and getters.
56. page � of �1 3
8. Alter the designated initializer initWithName:price: to take
two additional arguments,
corresponding to the new instance variables, and set them
accordingly.
9. Alter the init method so it uses the new designated initializer.
Use UNKNOWN for the
default manufacturer and 2013 for the default year.
10. Alter the makeBoobyPrize method so that the Prize it
creates has a manufacturer of
“Barney” and a year of 2013.
11. Alter the description method so that the string it returns has
the following form:
The value year manufacturer name worth $price.
An example might be:
The expensive 2003 Chevy Corvette worth $20000.00.
Use your valueString method to determine the value field in this
string.
12. Now replace all code in the main method with the following
steps. As above, I recommend
testing each step before proceeding.
a. Create an NSMutableArray.
57. b. Add Prize objects with the following values to the array, in
the order specified:
2003 Chevy Corvette worth $20,000.00
2009 Maytag washing-machine worth $650.00
A Booby-Prize created using the makeBoobyPrize: class method
2010 Carnival Cruise worth $5,000.00
2013 Bob’s Mansion worth 500,000.00
1999 Worlitzer organ worth $2,500.00
c. Print-out all objects in the array.
d. Using isBetterThan: messages, determine which of the
objects in the array is the best
Prize. Print-out the best prize.
13. Now repeat step 2 to create a class called PrizeChest. This
class should meet the following
criteria:
a. The class should have a single instance variable, an
NSMutableArray to hold prizes. We
don’t want users to directly set/get this array, so it should be
explicitly declared as an instance
variable (i.e., do not use a property).
page � of �2 3
b. The class should have one initializer named init, which will
be the designated
initializer. The initializer should create the prize array and add
to it the six prizes listed in step
12b above (hint: copy-and-paste is your friend here).
58. c. Override the description method so that it creates and returns
a string containing all of the
prizes in the array, one-per-line.
c. Add a method prizeAtIndex: that returns the prize at the
specified index.
d. Add a method bestPrize which finds (as per step 12d above)
and returns the best prize
in the array.
e. Add a method findBoobyPrizeIndex that finds and returns the
index of the booby
prize in the array. The booby prize can be determined by
looking through the array for the prize
whose name is “BOOBY PRIZE”.
f. Add a method shufflePrizes that shuffles the positions of the
prizes in the array. Use
the following algorithm:
FOR EACH array index curIndex DO
prize1 ← object at curIndex
randIndex ← random array index
prize2 ← object at randIndex
replace object at curIndex with prize2
replace object at randIndex with prize1
END FOR
g. After the array is populated in the init method send the
message shufflePrizes to
self.
14. Add the following steps to your main method:
59. a. Create a PrizeChest object.
b. Output the PrizeChest object.
c. Output the best prize in the PrizeChest (using the appropriate
message to determine
which is the best prize).
d. Output the index of the booby prize in the PrizeChest (using
the appropriate message to
determine the index).
15. Run your program and submit the output in a text file.
Compress your project by choosing
your project folder (in Finder) and then choosing File Menu-
Compress. Upload the output file
and the compressed project to Moodle for submission.
page � of �3 3
CS356 Lab 1: Getting Started with Xcode and Objective-C
Complete the following steps in order. Note that your program
may only use the classes and
messages listed on the last page of this lab. You may not use
array [] syntax for this lab.
1. Launch Xcode (which resides in the Applications folder).
2. Choose Create a new Xcode project from the splash screen
that appears. (Note that you can
always create a new project from inside Xcode by choosing File
Menu - New - Project).
60. 3. A dialog box will appear where you will specify the type of
project you want to create.
Choose Application from beneath OS X (on left hand side of the
dialog box), then Command
Line Tool. Then click Next.
4. In the next dialog box enter lab01 as the name for your
project in the Product Name field.
Xcode requires that you enter something in the Company
Identifier field; enter “SOU” (or a
company name of your choice). Set the Language to Objective-
C (that should be the default).
Then click Next.
5. You will be presented with a file chooser dialog. Navigate to
a place where you would like to
save your project. Then click Create. Note that local drives on
lab machines are not guaranteed
to preserve your files. I recommend saving your projects on
your P: drive.
6. You should now be in the Xcode project window for your
newly created project. The source
code files in the project are listed in the pane on the left-hand
side. In this case a single
Objective-C source code file has been created for you, called
main.m. Click on this file and you
will see its content in the text editor, which occupies the center
pane. This contains default code
supplied by Apple that outputs “Hello World”.
7. Now click the Build & Run button (the “play” button in the
top left corner). This will build
(compile & link) the template program into an executable and
then, assuming there are no errors,
61. the program will be run with output going to the All Output
pane (which will appear when
needed). Try removing a semi-colon from the NSLog statement
to see how Xcode reports errors.
Click on the red dot to the left of the error line and note that
Xcode will suggest a fix for the
error for you (accept the fix by hitting return).
8. Now delete the NSLog statement (inside the
@autoreleasepool block statement). Replace
with a program that does the following, using only classes and
messages listed on the next page.
Do not use array [] syntax.
page � of �1 3
In each step do not make assumptions about the array contents
based on the prior steps (e.g., the
number of elements in the array, the contents of the first
element, etc.).
a. Create a mutable array object, which will contain strings
representing presents.
b. Add the three strings “Car”, “Vacation”, and “Fridge” to the
array.
c. Add the names of two more presents you’ve received to the
end of the array.
d. Replace the second element in the array with the name of a
present you have received.
e. Replace the last element in the array with the name of
62. another present you’ve received.
f. For each object in the array, output a sentence containing the
index, name, length of the
name, and price of that object. The price should be formatted as
money. Use the following
formula to determine the price (where ndx is the array index of
the object):
price = 102.66 * (ndx + 15)
g. Build a single NSString object containing all of the objects
in the array on a single line
separated by commas. Then output that string.
9. Run your program and copy-and-paste the output into a text
file. You can use any text editor
for this (e.g., Apple supplies a simple text editor named
TextEdit). Compress your project by
choosing your project folder (in Finder) and then choosing File
Menu - Compress. Upload the
output file and the compressed project to Moodle for
submission.
page � of �2 3
Allowable Classes and Messages for Lab 1
NSLog function
NSArray/NSMutableArray Class
(Do not use array subscripting (arrayName[]) syntax).
alloc