Write a function that takes the current date and corrects the number of days, if it's wrong. The function must return true if the date passed to it is a valid date and false, if not. The main function uses the returned value to either print "Date validated", if a valid date was entered or "Invalid date entered. Changed to ", followed by the modified date.
For example: if given 11/31/2020, it will produce 12/1/2020. If given 2/29/2021, it will make it 3/1/2021. But, if 11/29/2020 is entered, it will not change it.
To check the date, the function uses the fact that months 4, 6, 9, 11 have 30 days, month 2 has 28 days in non-leap years and 29 in leap years and the remaining months have 31 days.
A year is a leap year if it's divisible by 400 or if not, it's divisible by 4, but not 100.
Example interaction between the user and the program:
Enter a date: 2/31/2021
Invalid date entered. Changed to 3/3/2021
Another example:
Enter a date: 12/32/2020
Invalid date entered. Changed to 1/1/2021
Another example:
Enter a date: 10/28/2020
Date validated.
Press any key to continue.
In: Computer Science
Purpose of Assignment As globalization continues to expand worldwide, multinational financial institutions become more important in helping nascent economies. These development banks not only provide financing for intellectual assistance to infrastructure projects, but also make available access to basic education as well. For a well-rounded knowledge of international economics, it is incumbent upon the business student to acquaint themselves of these global institutions. Assignment Steps Resources: Suggested but not required: Vreeland, James. {2003}. The IMF and Economic Development. New York, NY: Cambridge University Press. Search the Internet for vendors who sell this book or inquire about it with a local library. Select one financial institution from the following list: European Investment Bank Asian Development Bank World Bank Development Bank of Latin America International Monetary Fund Develop the following in a minimum 700-word essay: Describe its origin, organization, purpose, and tax benefits for new business. Analyze the interaction between the selected global financial institution and the exchange rate mechanism of the foreign exchange market. Consider these financial institutions as each team member will need to select international sources of financing for their Week 5 Final Business Plan Individual Assignment.
In: Operations Management
|
The Ferre Publishing Company has three service departments and two operating departments. Selected data from a recent period on the five departments follow: |
|
Service Departments |
Operating |
|||||
|
Administrative |
Janitorial |
Maintenance |
Binding |
Printing |
Total |
|
|
Costs |
$93,300 |
$66,200 |
$44,800 |
$248,300 |
$490,600 |
$943,200 |
|
Number of employees |
60 |
90 |
260 |
630 |
320 |
1,360 |
|
Square feet of space occupied |
3,100 |
11,800 |
8,800 |
10,400 |
68,900 |
103,000 |
|
Hours of press time |
9,600 |
28,200 |
37,800 |
|||
|
Required: |
|
Assuming that the company uses the direct method rather than the step-down method to allocate service department costs, how much cost would be assigned to each operating department? (Please enter allocations from a department as negative and allocations to a department as positive. The line should add across to zero. Do not round intermediate calculations. Round your answers to the nearest dollar amount.) |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
In: Accounting
In the current tax year, suppose that 3% of the millions of individual tax returns have errors or are fraudulent. Although these errors are often well concealed, let’s suppose that a through IRS audit (done by you of course) will uncover them. If a random 100 tax returns are audited what is the probability that the IRS will uncover at most 4 fraudulent returns? Create an Excel spreadsheet that may give you an idea about this probability. Hint: Use the RAND() function for every tax return. The RAND() function generates a random number between 0 and 1. If the RAND() function gives you a number that is less than or equal to 0.03 then you can assume that the return contains error. Otherwise you can assume that the return does not contain any error. You can press F9 on your keyboard to regenerate a new instance. You may have to create enough instances to come up with a good approximation of the probability value. You can also find the exact probability using Binomial Distribution. What does it mean if an IRS auditor uncovers no more than 3 fraudulent/erroneous returns for every 100 tax returns?
Please in Excel.
In: Statistics and Probability
Hawaiian Smoothies Company purchases fruit directly from growers and produces fresh fruit smoothies and juice blends with their special recipes. Sales revenue in 2017 was $4,400,000, Variable costs were 60% of sales and fixed costs were $1,400,000. Hawaiian Smoothies is evaluating two alternatives designed to enhance profitability.
Alternative one – Hawaiian Smoothies is considering purchasing automated processing equipment for preparing pineapples more efficiently. This strategy would increase fixed costs by $300,000 but decrease variable costs to 54% of sales.
Alternative two – Hawaiian Smoothies is considering the possibility of outsourcing their fruit processing to the Pineapple Press People, LLC. This would reduce fixed costs by $300,000 but increase variable costs to 65% of sales.
Answer the following questions based on the information above:
1- What is the current break-even point in sales dollars?
2- Ignoring taxes, what dollar sales volume is currently required to obtain a profit of $500,000?
3- Ignoring taxes, at what sales volume will both alternatives provide the same profit?
4- What are two weaknesses and two strengths for each alternative that Hawaiian Smoothie should consider?
5- What do you recommend Hawaiian Smoothies do, and why?
In: Accounting
Patient scenario
Mr. Singh is a 38-year old who practices power lifting 4 times per week. Usually Mr. Singh can “grip it and rip it” when performing 113 kg deadlifts but recently he has been having difficulty gripping the bar and experiencing fatigue and tingling in his hands. Mr. Singh’s trainer, Josephine, recommends he take a week off of working out before pushing his body any further. Dan returns to the gym a week later and attempts to bench press at a lighter weight to get warmed up. Josephine has to quickly spot him in a missed attempt. Mr. Singh becomes despondent and admits something might be wrong because he is still experiencing tingling, pain and weakness in his hands and now his feet as well.
Discussion Question: Research Mr. Singh's symptoms and determine a differential diagnosis by listing at least two different possible conditions that match some or all of Mr. Singh's symptoms. Justify why you selected each of the conditions on your list.
Write a detailed answer to the discussion question. Your post must be at least 3-4 sentences per differential diagnosis
In: Anatomy and Physiology
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class Exercise {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int[] WordsCharsLetters = {0,1,2};
while(input.hasNext())
{
String sentence=input.nextLine();
if(sentence!=null&&sentence.length()>0){
WordsCharsLetters[0] += calculateAndPrintChars(sentence)[0];
WordsCharsLetters[1] += calculateAndPrintChars(sentence)[1];
WordsCharsLetters[2] += calculateAndPrintChars(sentence)[2];
}
else
break;
}
input.close();
System.out.println("Words: " + WordsCharsLetters[0]);
System.out.println("Characters: " + WordsCharsLetters[1]);
System.out.println("Letters: " + WordsCharsLetters[2]);
}
static int[] calculateAndPrintChars(String sentence)
{
int[] WCL = new int[3];
String[] sentenceArray=sentence.split(" ");
WCL[0] = sentenceArray.length;
int letterCount=0;
for(int i=0;i<sentence.length();i++)
{
if(Character.isLetter(sentence.charAt(i)))
letterCount++;
}
WCL[1] = sentence.length();
WCL[2] = letterCount;
return WCL;
}
}
This is my code. It works but not the way I want it to. I need the user to input a sentence and the output to say how many words, letters, and characters there are in the sentence. In order for this code to give an output I've been having to type the sentence, press enter a few times, then a letter and then it gives me my output. Please help
In: Computer Science
Suppose you work in public relations for a company that is developing an attractive, affordable, low-emissions car. The company's engineers have just discovered that the car's fuel tank is placed so that in a very rare kind of crash (1 out of 10,000), the car will instantly explode, killing the people inside. This means that some people who drive the car will die in a horrible accident, but most drivers will be fine. You make sure this information is not made public, and at a press conference you lie and claim that the car is safe. Would a deontologist (someone who subscribes to Immanuel Kant's moral philosophy) say that you acted ethically? Explain why / why not (Be sure to formulate the maxim you act on when you tell the lie and test it. Recall the formula for maxims: "Whenever [circumstances], I'l | [action]"). Determine whether the maxim is consistent with the Categorical Imperative. If the maxim is not consistent with the Categorical Imperative, explain why the maxim fails Kant's test. Next, explain whether an Act Utilitarian would say that you acted ethically (be sure to explain what makes actions right / wrong in general for Act Utilitarianism). What would have to happen to make your lie about the car permissible for the Act Utilitarian?
In: Psychology
A9 .Q-Sorting is
a. distributing the cards from the California Q-Set in organized columns
b. taking a test where you press the spacebar each time the letter “Q” is in view on the screen
c. writing the letter “Q” as many times as you can in 120 seconds 350,000 times per day
d. choices a and b
B2. Sara, a therapy patient, begins to view her therapist the same way she views her ex-husband, whom she recently divorced. Which of the following terms best describes the process that may impact whether progress is made in Sara’s therapy?
a. insight.
b. countertransference
c. transference
d. thanatos
B3. The lexical hypothesis states that
a. words do not exist to describe personality
b. we have universal terms to describe individual differences
c. moods are more stable than traits
d. individual differences from culture to culture vary significantly
A3. Freud’s definition of mental health involves what?
a. problematic attachment relationships between mother and caregiver
b. one’s balance between love and work pursuits
c. libido and thanatos
d. Oedipus and the Electra iceberg fixation regression complex
In: Psychology
Write a program that will calculate the sum of the first n odd integers, and the
sum of the first n even integers.
Use a Do while loop
Use a for loop
Here is a sample of how the program should run:
How many odd integers would you like to add? 5
Count Odd Integer Sum
1 1 1
2 3 4
3 5 9
4 7 16
5 9 25
The sum of the first 5 odd integers is 25
How many even integers would you like to add? 7
Count Even Integer Sum
1 2 2
2 4 6
3 6 12
4 8 20
5 10 30
6 12 42
7 14 56
The sum of the first 7 even integers is 56
Do you want to add again? Press y or n
y
How many odd integers would you like to add?
Make sure your program works with any input value from 1 to 1000.
REMEMBER! The sum of the first 5 odd integers is 1 + 3 + 5 + 7 + 9. It is NOT the
sum of the odd integers up to 5
In: Computer Science