What is the difference between a cashier's check and a certified check? Can a bank refuse to certify a check? Can a bank refuse to honor a cashier’s check? When writing your response, be sure to discuss the issue and pay attention to your writing.
In: Operations Management
With Donald Trump as the current President of the U.S., are we likely to become more of a command economy? Justify the stand you take.
In: Economics
Define a problem with user input, user output, Switch and some
mathematical computation. Write the pseudocode, code and display
output.
Include source code and output. If no output explain the reason why
and what you are going to do make sure it does not happen again aka
learning from your mistakes.
Problem:
Pseudocode:
Code:
Output:
In: Computer Science
Cash Receipts
The sales budget for Perrier Inc. is forecasted as follows:
| Month | Sales Revenue |
|---|---|
| May | $130,000 |
| June | 150,000 |
| July | 200,000 |
| August | 130,000 |
To prepare a cash budget, the company must determine the budgeted cash collections from sales. Historically, the following trend has been established regarding cash collection of sales:
The company gives a 2 percent cash discount for payments made by customers during the month of sale. The accounts receivable balance on April 30 is $22,000, of which $7,000 represents uncollected March sales and $15,000 represents uncollected April sales. Prepare a schedule of budgeted cash collections from sales for May, June, and July. Include a three-month summary of estimated cash collections.
| Perrier, Inc. Schedule of Budgeted Cash Collections Quarterly by Months |
||||
|---|---|---|---|---|
| May | June | July | Total | |
| Total Cash receipts: | $Answer | $Answer | $Answer | $Answer |
In: Accounting
Define null hypothesis,alternative
hypothesis,reactivity
In: Psychology
Sitwell Corporation manufactures titanium and aluminum tennis racquets. Sitwell's total overhead costs consist of assembly costs and inspection costs. The following information is available:
| Cost | Titanium | Aluminum | Total Cost |
| Assembly | 500 mach. hours | 500 mach. hours | $45,000 |
| Inspections | 350 | 150 | $75,000 |
| 2,100 labor hours | 1,900 labor hours |
Sitwell is considering switching from one overhead rate based on
labor hours to activity-based costing.
Using activity-based costing, how much assembly cost is assigned to
titanium racquets?
In: Accounting
Question 1:Write a program that randomly generates 100 dates and
store them into a vector. Use the Date class provided . The dates
generated must be within 1000 days after 1/1/2000.
Question 2:Sort the 100 dates generated in Question 1 in ascending
order.
This is Class data.h.(Please don't change the data.h file)
data.h
#ifndef DATE_H_
#define DATE_H_
#include
#include
using namespace std;
class Date {
friend ostream &operator<<( ostream &,
const Date & );
private:
int day;
int month;
int year;
static const int days[]; // array of days per month
void helpIncrement(); // utility function for incrementing date
public:
Date(int=1, int=1, int=0);
void setDate(int,int,int);
bool leapYear( int ) const; // is date in a leap
year?
bool endOfMonth( int ) const; // is date at the end of month?
Date &operator++(); // prefix increment operator
Date operator++( int ); // postfix increment operator
const Date &operator+=( int ); // add days, modify object
bool operator<(const Date&) const;
void showdate();
};
const int Date::days[] =
{ 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
Date::Date(int d, int m, int y) {
day = d;
month = m;
year = y;
// initialize static member at file scope; one classwide copy
}
// set month, day and year
void Date::setDate( int dd, int mm, int yy )
{
year = yy;
month = ( mm >= 1 && mm <= 12 )? mm : 1;
// test for a leap year
if ( month == 2 && leapYear( year ) )
day = ( dd >= 1 && dd <= 29 ) ? dd : 1;
else
day = ( dd >= 1 && dd <= days[ month ] ) ? dd :
1;
} // end function setDate
// if the year is a leap year, return true; otherwise, return
false
bool Date::leapYear( int testYear ) const
{
if ( testYear % 400 == 0 ||
( testYear % 100 != 0 && testYear % 4 == 0 ) )
return true; // a leap year
else
return false; // not a leap year
} // end function leapYear
// determine whether the day is the last day of the month
bool Date::endOfMonth( int testDay ) const
{
if ( month == 2 && leapYear( year ) )
return testDay == 29; // last day of Feb. in leap year
else
return testDay == days[ month ];
} // end function endOfMonth
// function to help increment the date
void Date::helpIncrement()
{
// day is not end of month
if ( !endOfMonth( day ) )
day++; // increment day
else
if ( month < 12 ) // day is end of month and month < 12
{
month++; // increment month
day = 1; // first day of new month
} // end if
else // last day of year
{
year++; // increment year
month = 1; // first month of new year
day = 1; // first day of new month
} // end else
} // end function helpIncrement
// overloaded prefix increment operator
Date &Date::operator++()
{
helpIncrement(); // increment date
return *this; // reference return to create an lvalue
} // end function operator++
// overloaded postfix increment operator; note that the
// dummy integer parameter does not have a parameter name
Date Date::operator++( int )
{
Date temp = *this; // hold current state of object
helpIncrement();
// return unincremented, saved, temporary object
return temp; // value return; not a reference return
} // end function operator++
// add specified number of days to date
const Date &Date::operator+=( int additionalDays )
{
for ( int i = 0; i < additionalDays; i++ )
helpIncrement();
return *this; // enables cascading
} // end function operator+=
// overloaded output operator
ostream &operator<<( ostream &output, const Date
&d )
{
// static string monthName[ 13 ] = { "", "January",
"February",
// "March", "April", "May", "June", "July", "August",
// "September", "October", "November", "December" };
//
// output << d.day << " " << monthName[ d.month ]
<< " "<< d.year;
output << setfill('0')
<< setw(2)
<< d.day << '/'
<< setw(2)
<< d.month << '/'
<< setw(4)
<< d.year;
return output; // enables cascading
} // end function operator<<
bool Date::operator<(const Date& right) const {
return (year < right.year || (year == right.year
&& month < right.month) ||
(year ==
right.year && month == right.month && day <
right.day));
}
void Date::showdate()
{
cout << "The date is ";
cout << setfill('0')
<< setw(2) << day
<< '/'
<< setw(2) << month
<< '/'
<< setw(2) << year %
100
<< endl;
return;
}
#endif /* DATE_H_ */
In: Computer Science
Write a Python program that will process the text file, Gettysburg.txt, by calculating the total words and output the number of occurrences of each word in the file.
The program needs to open the file and process each line. You need to add each word to the dictionary with a frequency of 1 or update the word’s count by 1. You need to print the output from high to low frequency.
The program needs 4 functions.
The first function is called add_word where you add each word to the dictionary. The parameters are the word and a dictionary. There is no return value.
The second function is called Process_line where you strip off various characters, split out the words, and so on. The parameters are a line and a dictionary. It calls the add_word function with each processed word. There is no return value.
The third function is called Pretty_print where this will be the printing function. The parameter is a dictionary. There is no return value.
The fourth function is the main where it will open the file and call Process_line on each line. When finished, it will call the Pretty_print function to print the dictionary.
Gettysburg.txt
Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal.
Now we are engaged in a great civil war, testing whether that nation, or any nation so conceived and so dedicated, can long endure. We are met on a great battle-field of that war. We have come to dedicate a portion of that field, as a final resting place for those who here gave their lives that that nation might live. It is altogether fitting and proper that we should do this.
But, in a larger sense, we can not dedicate -- we can not consecrate -- we can not hallow -- this ground. The brave men, living and dead, who struggled here, have consecrated it, far above our poor power to add or detract. The world will little note, nor long remember what we say here, but it can never forget what they did here. It is for us the living, rather, to be dedicated here to the unfinished work which they who fought here have thus far so nobly advanced. It is rather for us to be here dedicated to the great task remaining before us -- that from these honored dead we take increased devotion to that cause for which they gave the last full measure of devotion -- that we here highly resolve that these dead shall not have died in vain -- that this nation, under God, shall have a new birth of freedom -- and that government of the people, by the people, for the people, shall not perish from the earth.
Abraham Lincoln
November 19, 1863
In: Computer Science
Can someone please check to see if these are right? If not please explain thank you!
Convert the following decimal numbers to their binary-octet equivalent.
114 = 1110010
254 =11111110
229 =11100101
66 = 01000010
7 =00000111
255 =11111111
192 =11000000
In: Computer Science
Describe the measurements of discharge at weirs and its potential errors associated with indirect methods weir in real-world application setting.
In: Civil Engineering
Case Scenario Mr Park is a heart patient who had a heart bypass recently. He has been the sole breadwinner in the family but ever since his heart bypass, he is not able to continue working. His wife is a homemaker and also his main caregiver. The couple has three children. Eldest son Ethan (aged 32), has recently gotten married and moved out. His relationship with his parents is amicable. However, he still relies heavily on his parents for financial support, as his employment is not stable. This creates a huge amount of stress on both Mr and Mrs Park as they themselves are worried about their financial situation, especially after Mr Park's heart bypass. Youngest son Mark (aged 18) is closest to the mother. He suffers from social phobia and does not attend school. His symptoms started around the time of Mr Park's discharge from hospital. He is of age to be enlisted for National Service (NS), but he might not be able to go through military training due to his psychological condition. Mindful of his condition, the parents give him a lot of space and make no demands of him. He plays computer games at home most of the time. Their second daughter Jill (aged 26) is currently the sole breadwinner of the family. She works as an administrative assistant and contributes some money to her parents. When she was 19, she quit university after her first semester and decided to start working because she felt that her eldest brother was continuing to rely on parents for financial support. She often will feel very angry that her parents depend on her so much and do not seem to insist that her eldest brother contribute. She also feels that her parents are over protective of her younger brother. There are constant quarrels between both patient and his wife over the issues of the children and also over care for him, at times escalating into shouting marathons. Two weeks ago, tired of all the fighting, they decided to stop talking altogether. Now, they are no longer quarrelling or shouting at each other, but instead are locked in a "cold war”. Soo words Guiding Questions Read the case scenario above. For the purpose of the reflection, imagine that this is your family, and that you are another son/daughter in this family. • 1. What, in your opinion, is contributing to the family situation? 2. How would you respond as a member of this family? 3. Why would you respond in the way(s) stated for Question 2 above? Explain. (500 words)
In: Psychology
What are some of the ways to ensure you have a "successful marriage" and how could you work to ensure that yours is one of these relationships?
In: Psychology
In: Operations Management
I need some asistance understanding of what to do for this problem in javascript:
* Problem 9 - find the largest number in the list of arguments
*
* Allow any number of arguments to be passed to the function. Allow both
* String and Number arguments to be passed, but throw an error if any other
* type is passed to the function (e.g., Boolean, Date, etc.). If the list
* is empty (nothing passed to the function), return null. Otherwise, return
* the largest value that was passed to the function as an argument:
*
* findLargest(1, 2, '3', '4', 5) should return 5
* findLargest('5') should also return 5
* findLargest(5, 3, 2, 1) should also return 5
******************************************************************************/
function findLargest() {
// Your code here...
}
here are the test cases:
const { findLargest } = require('./solutions');
describe('Problem 9 - findLargest', function() {
test('should find the largest number in a list', function() {
let largest = findLargest(1, 2, 3);
expect(largest).toBe(3);
});
test('should find the largest number in a list of 1', function() {
const largest = findLargest(1);
expect(largest).toBe(1);
});
test('should find the largest number in a long list', function() {
// https://github.com/gromgit/jstips-xe/blob/master/tips/33.md
const list = Array.apply(null, { length: 5000 }).map(Function.call, Number);
const largest = findLargest.apply(null, list);
expect(largest).toBe(4999);
});
test('should work with negative numbers', function() {
const largest = findLargest(1, 2, 3, -1, -2, -3);
expect(largest).toBe(3);
});
test('should work with strings that are numbers', function() {
const largest = findLargest('1', '2', '3');
expect(largest).toBe(3);
});
test('should work with decimals', function() {
const largest = findLargest(0.01, 0.001);
expect(largest).toBe(0.01);
});
test('should throw if a Boolean is included in the list', function() {
function shouldThrow() {
findLargest(1, true, 3);
}
expect(shouldThrow).toThrow();
});
test('should throw if an Object is included in the list', function() {
function shouldThrow() {
findLargest(1, console, 3);
}
expect(shouldThrow).toThrow();
});
test('should throw if a null is included in the list', function() {
function shouldThrow() {
findLargest(1, null, 3);
}
expect(shouldThrow).toThrow();
});
test('should throw if a undefined is included in the list', function() {
function shouldThrow() {
findLargest(1, undefined, 3);
}
expect(shouldThrow).toThrow();
});
test('should return null if the list is empty', function() {
const largest = findLargest();
expect(largest).toBe(null);
});
});
In: Computer Science
2. James Reid is a professional data analyst working as one of the key knowledge workers in 3M Company in the United States. Describe his job and the data that he will be dealing with during this period of Corona Virus pandemic. What do you think will be his possible contribution to the company’s Business Intelligence?
In: Operations Management