SCENARIO
You are in a job which you do not like, but it is well paid (high
salary). You live close to your work and usually walk to work every
morning. You also come home for lunch every day and eat with your
wife in the home. Just today, you have been offered a job which you
know you will enjoy, but it is slightly less paid (lower salary)
and twenty kilometers from your home. You are married, but no
children now. You would like to have children in the near
future.
WHAT TO DO a, b, c
.
25-35 words maximum for each answer to each question. Do not write
a full paragraph or essay.
(a) Type the HEADING for each question copy the question to your
WORD file. Use the HEADINGS . . .
1. Situation and Information
2. Barriers
3. Alternatives or Choices,
4. Values,
5. Decision,
6. Communication,
7. Risks and Consequences.
(b) Type/copy the question under the Heading
(c). Type your answer under the question.
SAMPLE ANSWER FORMAT
FORMAT FOR ANSWERS
1. SITUATION and INFORMATION
What is the problem you wish to solve with your decision? Follow
the first step of CCT.
What information do you need to solve the problem or to make a
decision?
2. BARRIERS
Any BARRIERS to making this decision?
3. ALTERNATIVES or CHOICES
What are the alternative solutions to your problem?
4. VALUES
What values do you have which may influence your decision?
5. DECISION
6. COMMUNICATION
How will you tell your boss?
How will you tell your wife?
7. RISK AND CONSEQUENCES
What possible risks and consequences could happen because of your
decision?
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Answer these 6 questions USING WHAT YOU HAVE LEARNED ABOUT
DECISION MAKING
1. THE SITUATION and INFORMATION: What is the problem you wish to
solve with your decision? What information do you need to solve the
problem or to make a decision? (remember to use the process of
decision making that you learned.)
2. BARRIERS: What are the barriers to making this decision? Use the
information from the slides.
3. ALTERNATIVES or CHOICES (different possible solutions): What are
the alternative solutions to your problem? Hint: Maybe there is
some other decision that is not keep the old job, or take the new
job. BUT . . . you CANNOT JUST QUIT AND HAVE NO JOB.
4. VALUES: What values do you have which may influence your
decision?
What are the values you have and believe in which might influence
your decision? Such values could include: ďˇ
having lots of money to buy things and do things, ďˇ
having a successful career, big job ďˇ
respecting your wifeâs wishes, and feelings ďˇ
having plenty of time to do fun things and the things you want to do ďˇ
What are your goals in life? ďˇ
What does your work mean to you? ďˇ
What does your marriage/family mean to you?
5. DECISION. Write your decision.
6. COMMUNICATION. How will you tell your boss? How will you tell
your wife? Remember the Model of Communication to help you with the
channel.
7. RISKS & CONSEQUENCES: What possible risks and consequences
could happen because of your decision?
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
In: Operations Management
In this problem, we will use our knowledge of maps and lists to build a spell-checking program. The class Main contains the starter code for this problem; your task is to complete this program. You are provided with a file titled words.txt, which contains a list of valid English words, one per line. Your program should take as input a line of space-separated words representing a sentence. (No punctuation or capitalization will be used; all characters will be either the space character or a lowercase English letter). You should then output a list of words in the input that are misspelled, each on their own line, followed by a newline.
For example, if our input is:
teh qwick braown foxx jumpps ovar teh laizy dog
then we should print:
teh
qwick
braown
foxx
jumpps
ovar
teh
laizy
Restrictions:
(a) You may not use any of Javaâs built-in data structures except for arrays. (In particular, you should write your own implementation of HashSet. I suggest calling this MyHashSet. Additionally, if you want to use lists to handle collisions, you will need to write your own implementation of a LinkedList or ArrayList.)
(b) Your algorithm should run in approximately O(m+n) time, where m is the total number of words in the file words.txt and n is the number of words in the input sentence.
(c) Violations of these restrictions will result in your receiving a zero for
this question
Hints :
(a) As a first step, I would recommend implementing your own ver-
sion of hash sets, called âMyHashSetâ. I would suggest using the
MyLinkedList class from the last assignment as an example.
i. Your hash set should support an âaddâ method, which takes in
a string and puts it in the set.
ii. Your hash set should support a âcontainsâ method, which takes
in a string and returns true if itâs in the set, and false otherwise.
iii. Your hash set should contain an array for holding the underlying
data.
iv. Your hash set should include a hash function. I suggest research-
ing one on the Internet and using that.
v. Your hash set should handle collisions somehow. I suggest using
a linked list.
(b) As a second step, you should iterate through the lines in
words.txt, and put each one in an instance of your hash set. Code for reading from the file has been provided; your job is to put each word in your
hash set.
(c) As a third step, you should iterate through the input words, check if
each one is in the set, and print it if it is not (i.e. it is not in the set
of real English words).
//Starter code
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// Step 1: load our txt file of English words.
try {
BufferedReader rd = new BufferedReader(new
FileReader("words.txt"));
String currentLine = null;
while ((currentLine = rd.readLine()) != null) {
// TODO do something with the words we're reading
}
} catch (IOException e) {
System.out.println("Exception loading words.txt.");
}
// Step 2: read the sentence given into an array of strings
String[] sentenceWords;
String input = sc.nextLine();
if (input.equals("")) {
sentenceWords = new String[0];
} else {
sentenceWords = input.split(" ");
}
// Step 3: print all misspelled words
// TODO implement this using your own version of a HashSet.
}
}
In: Computer Science
Use CSS to format the appearance of a web page containing several literary quotes marked as blockquote elements. Figure 2â54 shows a preview of the formatted page.
Figure 2-54
Do the following:
1.Open the files code2-1.html and code2-1.css and in the comment section enter your name (First + Last) and the date (MM/DD/YYYY) into the Author: and Date: fields of each file.
2. Go to the code2-1.html file and within the head section insert a link element linking the page to the code2-1.css file. Review the contents.
3.In the code2-1.css file create a style rule for the h1 element that sets the font-size property to 3.5em and sets the line-height property to 0em.
4.Create a style rule for h1 and h2 elements that applies the fonts Helvetica, Arial, sans-serif to the font-family property and sets the letter-spacing property to 0.1em.
5. Create a style rule for the blockquote element that sets the color property to the value hsl(30, 85%, 45%) and sets the font-size property to 1.5em. Also, create a style for the first letter of the blockquote element that sets the font-size property to 1.5em.
6. Create a style for the footer element that:
7. Open the code2-1.html file in browser preview, verifying that the page resembles that shown in Figure 2â54 (aside from the line length which depends on the width of your browser window.)
Pages to be edited:
code2-1.css:
@charset "utf-8";
/*
New Perspectives on HTML5 and CSS3, 8th Edition
Tutorial 2
Coding Challenge 1
Author:Alexandria Woodson
Date: 10/6/2020
Filename: code2-1.css
code2-1.html:
<!doctype html>
<html lang="en">
<head>
<!--
New Perspectives on HTML5 and CSS3, 8th Edition
Tutorial 2
Coding Challenge 1
Author:
Date:
Filename: code2-1.html
-->
<meta charset="utf-8">
<title>Coding Challenge 2-1</title>
</head>
<body>
<h1>Literary Excerpts</h1>
<h2>A Selection of Great Prose</h2>
<blockquote>
We are the music-makers, And we are the dreamers of dreams, Wandering
by lone sea-breakers, And sitting by desolate streams. World-losers and
world-forsakers, Upon whom the pale moon gleams; Yet we are the movers
and shakers, Of the world forever, it seems.<br />
— <cite>Arthur OâShaughnessy, Poems of Arthur OâShaughnessy</cite>
</blockquote>
<blockquote>
I took a deep breath and listened to the old brag of my heart.
I am, I am, I am.<br />
— <cite>Sylvia Plath, The Bell Jar</cite>
</blockquote>
<blockquote>
The most beautiful things in the world cannot be seen or touched, they
are felt with the heart.<br />
— <cite>Antoine de Saint-Exupéry, The Little Prince</cite>
</blockquote>
<blockquote>
Stuff your eyes with wonder, he said, live as if youâd drop dead in ten
seconds. See the world. Itâs more fantastic than any dream made
or paid for in factories.<br />
— <cite>Ray Bradbury, Fahrenheit 451</cite>
</blockquote>
<footer>
The Word Factory
</footer>
</body>
</html>
In: Computer Science
Fanatically focusing on execution and brand. Thatâs how analysts describe the strategic approach of Warby Parker, a New York City eyewear startup thatâs quickly disrupting the old-fashioned eyewear business. Co-founded in 2010 by David Gilboa and Neil Blumenthal (who are also now co-CEOs), Warby Parker has shown itself to be a fierce and successful competitor. Why? âOne word, deliberate.â They are disciplined about their brand, but embrace and exploit technology in disrupting the staid and conservative way eyewear has traditionally been sold. So what does Warby Parker do?
To appreciate what Warby Parker is doing, we need to look back at how the idea for the company came about. After leaving a $700 pair of Prada frames in a seat-back pocket on a flight while backpacking in Southeast Asia, Gilboa began questioning why he had a $200 iPhone in his pocket that had the technology to do a number of really cool things and yet replacing that pair of glassesâa technology thatâs hundreds of years oldâwould cost way more than that $200 iPhone.57 (Links to an external site.) Like many other entrepreneurs, he believed there had to be a better way. His research exposed an industry that was a virtual monopoly with a very powerful eyewear supplier, thus the reason for the high-priced eyewear. Gilboa and a friend, who were both in Whartonâs MBA program, werenât even sure they could take on such a powerful competitor until they teamed up with Blumenthal (also at Wharton). Blumenthal was rumored to know âmore than pretty much anyone else in the world about how to work outside of the traditional eyeglass-supply chains.â Well, it didnât take long for the crew to start selling eyewear online from a Philadelphia apartment.
Future Vision
Today, Warby Parker designs and manufactures its own trendy, stylish frames and sells them directly to consumers over the Internet for an affordable $95 a pair. That price also includes prescription lenses, shipping, and a donation to VisionSpring, a not-for-profit where Blumenthal served as a director. The company has begun opening brick-and-mortar stores, with 11 open currently. Other growth plans include expanding their product mix, diversifying their frame selection into areas such as kidsâ frames and glasses with progressive lenses, and exploring revolutionary technologies that would do eye exams online. Warby Parker was named Fast Companyâs Most Innovative Company of 2015 and was honored as a finalist in the 2014 USA Today Entrepreneur of the Year. Another thing Warby Parker does is its âBuy a Pair, Give a Pairâ program, which benefits visually-impaired individuals in developing countries. Meanwhile, to carry on the companyâs success, Gilboa and Blumenthal will continue being disciplined in all they do, fanatically focusing attention on execution and brand. That future vision should help Warby Parker continue on its successful journey.
In: Operations Management
For this assignment, you will be analyzing the Java⢠code in the linked Week 3 Analyze Assignment Zip File, and predicting the results. You will also examine both the code and the output for inconsistencies and clarity. This Java⢠code includes examples of for, while, and do-while loops.
Carefully read through the code line by line, then answer the following questions in a MicrosoftÂŽ Word document:
Note: You do not have to make the improvements in the Java⢠program, although you certainly may. For this assignment, simply describe the things you see that would need to be improved to elevate the code and output to a more professional level. For the code, consider variable names and hardcoding. For the output, consider formatting/punctuation, repetition, accuracy of information, and wording.
/**************************************************************************************
* Program: PRG/420 Week 3
* Purpose: Week 3 Analyze Assignment
* Programmer: Iam A. Student
* Class: PRG/420
* Creation Date: 10/22/17
******************************************************************************************
* Program Summary: For, while, and do-while loops
*
* This program demonstrates the syntax for the for, while, and
do-while loops. It also
* contains comments that explain why a programmer would use a for
loop over a while or do-while
* loop.
*
* Notice the increment operator (i++) and also notice the copious
use of println() statements.
* Using System.out.println() is an excellent way to debug your
code--especially if your loop code
* is giving unexpected results.
*****************************************************************************************/
package PRG420Week3_AnalyzeAssignment;
public class PRG420Week3_AnalyzeAssignment {
public static void main(String[] args) {
// for loops are a good choice when you have a specific number of
values
// you want to iterate over and apply some calculation to.
System.out.println("FOR LOOP - Here are the taxes on all 10
prices:");
double taxRate = 0.08;
for (int price=1; price<=10; price++) {
System.out.println("The 8% tax on " + price + " dollar(s) is " +
"$" + (price * taxRate));
}
System.out.println(""); // Leave a blank space
// while loops are a good choice when you're looking through a pile
of values
// and want to execute some logic while some condition is
true.
// while loops MAY OR MAY NOT EVER EXECUTE, depending on the
counter value.
int dollars=1;
System.out.println("WHILE LOOP - Here are the taxes on prices less
than $5:");
while (dollars < 5) {
System.out.println("The 8% tax on " + dollars + " dollar(s) is $" +
(dollars * taxRate));
dollars++;
}
System.out.println(""); // Leave a blank space
// do-while loops are also a good choice when you're looking
through a pile of values
// and want to execute some logic while some condition is
true.
// do while loops ALWAYS EXECUTE AT LEAST ONCE, no matter what the
counter value.
// For example, in the code below, we want to print out the tax
only on those
// amounts smaller than $1. But because we're using the do-while
loop, the code
// will execute the body of the loop once before it even checks the
condition! So
// we will get an INCORRECT PRINTOUT.
dollars=1;
System.out.println("DO-WHILE LOOP - Here are the taxes on prices
less than $1:");
do {
System.out.println("The 8% tax on " + dollars + " dollar(s) is $" +
(dollars * 0.08));
dollars++;
} while (dollars < 1);
}
}
In: Computer Science
For this assignment, you can build on the 9th exercise that you made for the Assignment 1. So, you have a file named âband.htmlâ.
Here is the band.html page that I did in the last assignment that this assignment starts off with:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Assignment One</title>
<meta charset="utf-8">
</head>
<body>
<!--HTML to display name with largest heading element -->
<h1>My Name</h1>
<hr>
<!-- absolute link to school website -->
<a href="https://www.uncg.edu/">UNCG</a>
<hr>
<!--Unordered list to display days of the week -->
<h3>Week Days</h3>
<ul>
<li>Sunday</li>
<li>Monday</li>
<li>Tuesday</li>
<li>Wednesday</li>
<li>Thursday</li>
<li>Friday</li>
<li>Saturday</li>
</ul>
<hr>
<!--4 -->
<h3>Ordered List</h3>
<!--Ordered list -->
<ol type="A">
<li>HTML</li>
<li>XML</li>
<li>XHTML</li>
</body>
</html>
Website Section
<!DOCTYPE html>
<html lang="en">
<head>
<!--title for web page -->
<title>My Favorite Musical Group</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<h1>My Favorite Musical Group: Old Dominion</h1>
<h3>Group Members:</h3>
<!-- Unordered list -->
<ul>
<li>Matthew Ramsey</li>
<li>Trevor Rosen</li>
<li>Brad Tursi</li>
<li>Geoff Sprung</li>
<li>Whit Sellers</li>
</ul>
<h3>Albums:</h3>
<!--Description List -->
<dl>
<li>Happy Endings (2017) - This album is my favorite of all their albums. It contains some well-known songs, such as "No Such Thing as a Broken Heart," "Hotel Key," and "Written in the Sand." </li>
<li>Meat and Candy (2015) - This album was their first album and it really set the tone for the rest of their music to come. It was an overall very vocally strong album. </li>
</ol>
<hr>
<!--hyperlink -->
click here for <a href="https://www.weareolddominion.com/">more details</a>
</body>
</html>
In: Computer Science
Module 1 Program
Write a complete Java program in a file called Module1Program.java that reads all the lyrics from a file named lyrics.txt that is to be found in the same directory as the running program. The program should read the lyrics for each line and treat each word as a token. If the line contains a double (an integer is also treated as a double) it should use the first double it finds in line as the timestamp for the line. Treat the first line so that it has a timestamp of 0.00. The last line of the lyrics will have a timestamp. All the timestamps will be in double format. If a line has more than one timestamp, use the first timestamp found searching left to right for the outpt timestamp of that line. Some lines may not contain an embedded timestamp. Interpolate the timestamp so that it is evenly spaced from the preceding line that has a timestamp to next line which also has a timestamp. When displaying the output, display the timestamp for the line as double with 2 places past the decimal place. For example if lyrics.txt contains
Ay Fonsi 5.02 DY Oh, oh no, oh no Oh, yeah Diridiri, dirididi Daddy Go Si, sabes que ya llevo un rato mirandote Tengo que bailar 10.4 contigo hoy (DY) Vi que tu 12 mirada 12.1 ya estaba llamandome Muestrame el camino que yo voy (oh) Tu, tu eres el iman y yo soy el metal Me voy acercando y 15.5 voy armando el plan
Then your program should print to the screen
0.00 Ay 2.51 Fonsi 5.02 DY 5.92 Oh, oh no, oh no 6.81 Oh, yeah 7.71 Diridiri, dirididi Daddy 8.61 Go 9.50 Si, sabes que ya llevo un rato mirandote 10.40 Tengo que bailar contigo hoy (DY) 12.00 Vi que tu mirada ya estaba llamandome 13.17 Muestrame el camino que yo voy (oh) 14.33 Tu, tu eres el iman y yo soy el metal 15.50 Me voy acercando y voy armando el plan
A little starter code:
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
/**
* Program that reads lyrics from file lyrics.txt and prints the lyrics
* with a timestamp to the left of each line
public class Module1Program {
public static final int NUM_LINES = 200;
public static void main(String[] args) {
File theSong = new File("lyrics.txt");
Scanner input;
try {
input = new Scanner(theSong);
} catch (FileNotFoundException e) {
System.out.println("File not found");
return;
}
while (input.hasNextLine()) {
System.out.println(input.nextLine());
}
input.close();
}
}
Make sure that your program does not have a Package.
Testing: You should test your program in a variety of situations â missing file, empty file, file too long, file with only one timestamp, file with multiple timestamps per line.
In: Computer Science
Please use python3
Create the function team_average which has the following header
def team_average(filename):
This function will return the average number of games won by the Red Sox from a text file with entries like this
2011-07-02 Red Sox @ Astros Win 7-5 2011-07-03 Red Sox @ Astros Win 2-1 2011-07-04 Red Sox vs Blue Jays Loss 7-9
This function should create a file object for the file whose
name is given by the parameter filename.
If the file cannot be opened, use a try/except statement to print
an error message and don't do any further work on the file.
The function will count the number of lines and the number of games
the Red Sox won and use these values to compute the average games
won by the team.
This average should be expressed as an integer.
Test Code
Your hw2.py file must contain the following test code at the bottom of the file
team_average('xxxxxxx')
print(team_average('red_sox.txt'))
For this test code to work, you must copy into your hw2
directory the file red_sox.txt from
/home/ghoffman/course_files/it117_files.
To do this go to your hw2 directory and run cp
/home/ghoffman/course_files/it117_files/red_sox.txt .
Suggestions
Write this program in a step-by-step fashion using the technique
of incremental development.
In other words, write a bit of code, test it, make whatever changes
you need to get it working, and go on to the next step.
Cannot open xxxxxxx None
Output
When you run the completed script, you should see
Error: Unable to open xxxxxxx 76
In: Computer Science
Below is what I have to do. This is all performed in SQL. I have written a bunch of code, that I have also provided. Any help is appreciated
Exercises
Complete each of the following exercises. If you are unsure how to accomplish the task, please consult the coursework videos where there are explanations and demos.
Your select statement should include
product id, product name, product category and product
department.
Written Code
use fudgemart_v3
go
--Question 1
--This runs but doesn't supply correct output
select * from fudgemart_products
select right(product_name, charindex(' ', product_name)) as
product_category from fudgemart_products
go
---Runs but returns NULL for product_Category
select product_id, product_name, product_department
from fudgemart_products
order by product_id
declare @product_name as varchar(20)
select right(@product_name, charindex(' ',@product_name)) as
product_category
print len(@product_name)
---question 2-----
drop function dbo.f_vendor_sales
go
declare @vendor_id int
set @vendor_id = 1
select count(*) from fudgemart_products where product_vendor_id =
@vendor_id
go
--Function says it is completed
create function dbo.f_total_vendor_sales(
@vendor_id int --input
) returns int as
begin
declare @count int
set @count = (select count(*) from
fudgemart_products.dbo.product_wholesale_price where
product_vendor_id = @vendor_id)
return @count --output
end
go
---When i attempt function, I get invalid object name
select product_vendor_id, product_wholesale_price,
dbo.f_total_vendor_sales(product_vendor_id) as
total_vendor_sales
from fudgemart_products
----For question 3-------
create procedure p_write_vendor
(
@vendor_name varchar (50),
@vendor_phone varchar (20),
@vendor_website varchar (100)
) as
if exists ( select 1 from fudgemart_vendors
where vendor_name = @vendor_name
or vendor_phone = @vendor_phone
or vendor_website = @vendor_website)
begin
update fudgemart_vendors
set vendor_name
=@vendor_name,
vendor_phone =
@vendor_phone,
vendor_website =
@vendor_website
where vendor_name =
@vendor_name
or vendor_phone =
@vendor_phone
or vendor_website =
@vendor_website
end
else
begin
insert into fudgemart_vendors
values (@vendor_name, @vendor_phone, @vendor_website)
end
In: Computer Science
Exotic Food Inc., a food processing company located in Herndon, VA, is considering adding a new division to produce fresh ginger juice. Following the ongoing TV buzz about significant health benefits derived from ginger consumption, the managers believe this drink will be a hit. However, the CEO questions the profitability of the venture given the high costs involved. To address his concerns, you have been asked to evaluate the project using three capital budgeting techniques (i.e., NPV, IRR and Payback) and present your findings in a report.
CASE OVERVIEW
The main equipment required is a commercial food processor which costs $200,000. The shipping and installation cost of the processor from China is $50,000. The processor will be depreciated under the MACRS system using the applicable depreciation rates are 33%, 45%, 15%, and 7% respectively. Production is estimated to last for three years, and the company will exit the market before intense competition sets in and erodes profits. The market value of the processor is expected to be $100,000 after three years. Net working capital of $2,000 is required at the start, which will be recovered at the end of the project. The juice will be packaged in 20 oz. containers that sell for $3.00 each. The company expects to sell 150,000 units per year; cost of goods sold is expected to total 70% of dollar sales.
Weighted Average Cost of Capital (WACC):
Exotic Foodâs common stock is currently listed at $75 per share; new preferred stock sells for $80 per share and pays a dividend of $5.00. Last year, the company paid dividends of $2.00 per share for common stock, which is expected to grow at a constant rate of 10%. The local bank is willing to finance the project at 10.5% annual interest. The companyâs marginal tax rate is 35%, and the optimum target capital structure is:
| Common equity | 50% |
| Preferred | 20% |
| Debt | 30% |
Your main task is to compute and evaluate the cash flows using capital budgeting techniques, analyze the results, and present your recommendations whether the company should take on the project.
QUESTIONS
To help in the analysis, answer all the following questions. Present the analysis in one Excel file with the data, computations, formulas, and solutions. It is preferred that the Excel file be embedded inside the WORD document (question 8).
| Years | Free Cash Flows |
| 0 | ($252,000.00) |
| 1 | $118,625.00 |
| 2 | $127,125.00 |
| 3 | $181,000.00 |
In: Finance