Questions
What is financial capital?Why is it vital to decision making and the success of an enterprise?Why...

What is financial capital?Why is it vital to decision making and the success of an enterprise?Why aren’t profits alone sufficient?

In: Finance

A question about exceptions, the language is JAVA. The purpose is writing a program that reads...

A question about exceptions, the language is JAVA.

The purpose is writing a program that reads a string from the keyboard and tests whether it contains a valid time.
Display the time as described below if it is valid, otherwise display a message as described below.
The input date should have the format hh:mm:ss (where hh = hour, mm = minutes and ss =
seconds in a 24 hour clock , for example 23:47:55).
Here are the input errors (Exceptions) that your program should detect and deal with:
Receive the input from the user ( give an example of the format you are expecting the user to use
when entering the time ) and check for the following:
a. missing one of parts (the hour or the minutes or the second is missing.
b. hh, mm or ss is not numeric
c. hh not between 0 and 23
d. mm is not between 0 and 59
e. ss is not between 0 and 59

Be specific when reporting an error. For example, “The input 24:04:20 contains an invalid hour
of 24”.
If the user gives you invalid input, start the whole process again by asking the user for a valid
time. Keep prompting the user until you get a valid time. A while (!valid) loop would work well
here.
If the time is valid, then output a message in this format, “23:45:16 is 11:45:16 pm”. That is,
convert it to the am/pm format.

The program should be coded as a series of method calls (within the try block, inside the while loop):
1. getInput( ) – asks the user for the time. Uses the String split( ) method to break it into 3 parts.
Checks that there are 3 parts and throws a MissingColonException if there aren’t. The method
returns the String array.
2. checkHour( ) – receives the hour String part of the array, tries to convert it to a numeric value, then
checks if the number is between 0 and 23. Throws NumberFormatException and HourException
3. checkMinutes( ) – similar to checkHour( )
4. checkSeconds( ) – similar to checkHour( )

Notes:
1. Be sure that the output that you submit shows that your program has tested ALL the
different types of errors that can occur.
2. The messages output by the catch blocks should be very specific. For example, output “24 is an
invalid hour”, or “23:15 is missing one part”, rather than simply “invalid hour” or “invalid input”.
The first 2 messages allow the user to better understand what input caused the problem; the other
messages leave the user guessing about what the source of the problem is.
3. You do not need to write code for the NumberFormatException class; this already exists as
part of Java.
4. You’ll need to write class definition files for the other exceptions described above.

In: Computer Science

Describe the Stanford prison experiment. What are your thoughts on it? (100 words minimum) Describe Milgram’s...

Describe the Stanford prison experiment. What are your thoughts on it? (100 words minimum)

Describe Milgram’s study on obedience. What are your thoughts on it? (100 words minimum)

Describe the bystander effect. What are your thoughts on it? (100 words minimum)

In: Psychology

Do only in C# (Not in C++ or C ) Minimum number of operations to convert...

Do only in C# (Not in C++ or C )

Minimum number of operations to convert array M to array N by adding an integer into a subarray

Given two arrays M and N , the task is to find the minimum number of operations in which the array M can be converted into array N where each operation consists of adding an integer K into a subarray from L to R.

M= {3, 7, 1, 4, 1, 2}, N = {3, 7, 3, 6, 3, 2}
Output: 1

In the above given example only one operation is required to convert from M to N: L = 3, R = 5 and K = 2
Array after the following operation:
Index 0: M[0] = 3, N[0] = 3
Index 1: M[1] = 7, N[1] = 7
Index 2: M[2] = 1 + 2 = 3, N[2] = 3
Index 3: M[3] = 4 + 2 = 6, N[3] = 6
Index 4: M[4] = 1 + 2 = 3, N[4] = 3
Index 5: M[5] = 2, N[5] = 2

M= {1, 1, 1, 1, 1},N = {1, 2, 1, 3, 1}
Output: 2

In the above given example only one operation is required to convert from M to N –
Operation 1: Add 1 to L = 2 to R = 2
Operation 2: Add 2 to L = 4 to R = 4

In: Computer Science

Then answer the following questions about each unit: What is the name of the unit that...

Then answer the following questions about each unit:

What is the name of the unit that you found, and how is it commonly used? How do you convert an everyday quantity (mass of a candy bar, the volume of a soda can, length of a soccer field, etc.) into that unit?

In: Physics

1.In Canada and the United States, the use of technology for training has fallen below projections;...

1.In Canada and the United States, the use of technology for training has fallen below projections; in fact, the adoption of training technologies has been relatively slow and most training still takes place in the classroom. What are some of the reasons for this, and what are the potential barriers to the adoption of training technologies?

4.If you had the choice, would you choose a computer-based training program or a traditional classroom program? Which would you prefer, and why? Do you think your satisfaction, learning, and performance would differ in a computer-based program versus a traditional classroom program? Explain your reasoning.

8.Research on the effects of computer-based training has found that it is more effective than classroom instruction when trainees can choose the program (computer-based or classroom) and when the instructional methods used to deliver the programs are different. What are the implications of these two findings for understanding the effects of computer-based training and for the design and delivery of computer-based training programs?

10.What does learner control refer to and what role does it play in technology-based training? Why is learner control not always effective? What can be done to make it more effective?

In: Operations Management

On average, a lightning flash on Earth transfers about 30 C is transferred across 1 GV....

On average, a lightning flash on Earth transfers about 30 C is transferred across 1 GV.

Suppose that, in a single lightning flash, 27.7 C of charge is transferred through a potential difference of 2.44 GV. If all this energy could be used to accelerate a car of mass 1,427 kg car from rest, what speed would the car reach, in m/s?

NOTE: 1000 m/s is 2237 miles per hour!

In: Physics

in c++ a Circle should be created with the default constructor, then its area, diameter, and...

in c++ a Circle should be created with the default constructor, then its area, diameter, and circumference printed to the screen for verification that it has the correct state and those respective methods work correctly. Then, output of the state should be repeated after calling each mutator to ensure that the object’s new state reflects the change

Create a Circle class with the class implementation in a file named circle.cpp and the class declaration in a file named circle.h (or circle.hpp) with

- private data member for double parameter: ‘radius’

- a default constructor which has no parameters

- an overloaded constructor which takes in a single double parameter for ‘radius’

-accessor and mutator for ‘radius’ named getRadius(…) and setRadius(…)

- member functions to return doubles for calculated parameters: area( ), diameter( ) and circumference( )  PI should be assumed to be exactly 3.141592. You may define this as a static const double at the class scope, as a const double inside any method that uses it, or as a literal in the expression in which it’s used

In: Computer Science

What is semaphore? List the properties of semaphore variables. Define the wait function wait(s).

What is semaphore? List the properties of semaphore variables. Define the wait function wait(s).

In: Computer Science

2. Set up both the vector of state probabilities and the matrix of transition probabilities given...

2. Set up both the vector of state probabilities and the matrix of transition probabilities given the following information: Store 1 currently has 40% of the market; store 2 currently has 60% of the market. In each period, store 1 customers have an 80% chance of returning; 20% of switching to store 2.

In each period, store 2 customers have a 90% chance of returning; 10% of switching to store 1. a.

Find the percentage of market for each store after 2 periods. b. Find the equilibrium conditions of 2 stores (limiting probabilities). What’s the meaning of these probabilities?

In: Math

What social factors affect your family life? In what ways is your family life different from...

What social factors affect your family life? In what ways is your family life different from that of your grandparents when they were your age?

In: Psychology

No phot or handwriting (managerial accounting) Prepare a Flexible Budget based upon Actual Output. Assume the...

No phot or handwriting (managerial accounting)

  1. Prepare a Flexible Budget based upon Actual Output. Assume the actual units of production. The budget should consist of one revenue item and at least five expenses items. One expense should be semi-variable in nature, two should be variable and two should be fixed in nature.

You are also required to compare the Flexible Budget with your Actual Results showing the Variance in a tabular form.

In: Accounting

Design a class named Account (put it in a package named accountspackages) with the following UML...

Design a class named Account (put it in a package named accountspackages) with the following UML diagram:

Account

-customerID: int

-customerName: String

-balance: double

+setCustomerID(int): void

+setCustomerName(String): void

+setBalance(double):void

+getCustomerID(): int

+getCustomerName(): String

+getBalance(): double

+deposit(double): void

+withdraw(double): void

+printInformation():void

The method withdraw(double) withdraws a specified amount from the account if the amount is less than or equal the balance, otherwise the method prints the message:

Sorry! The account does not have sufficient funds.

The method printInformation() prints:

    the customerName, the customerID, and the account balance.

Test the Account class by running the following code

(You are not allowed to modify this code):

package accountsdemocom;

public class AccountDemo{

   public static void main(String[] args) {

        Account accountOne = new Account();

        Account accountTwo = new Account();              

        accountOne.setCustomerID(78654);

        accountOne.setCustomerName("John Smith");

        accountOne.deposit(10000.0);

        accountOne.withdraw(25000.0);

        accountTwo.setCustomerID(76234);

        accountTwo.setCustomerName("Jennifer Harris");

        accountOne.deposit(2000.0);

        accountOne.withdraw(150.0);

        accountOne.printInformation();

        accountTwo.printInformation();

        accountOne.withdraw(250.0);

        accountOne.getBalance();     

    }

}

In: Computer Science

Write a regular expression, using the regular expression syntax used by lex, that matches any finite...

Write a regular expression, using the regular expression syntax used by lex, that matches any finite decimal representation of a nonnegative real number.

In: Computer Science

Calisto Launch Services is an independent space corporation and has been contracted to develop and launch...

Calisto Launch Services is an independent space corporation and has been contracted to develop and launch one of two different satellites. Initial equipment will cost $740,000 for the first satellite and $810,000 for the second. Development will take 5 years at an expected cost of $150,000 per year for the first satellite; $80,000 per year for the second. The same launch can be used for either satellite and will cost $225,000 at the time of the launch 5 years from now. At the conclusion of the launch, the contracting company will pay Calisto $2,350,000 for either satellite.
Calisto is also considering whether they should consider launching both satellites. Because Calisto would have to upgrade its facilities to handle two concurrent projects, the initial costs would rise by $190,000 in addition to the first costs of each satellite. Calisto would need to hire additional engineers and workers, raising the yearly costs to a total of $380,000. An additional compartment would be added to the launch vehicle at an additional cost of $35,000. As an incentive to do both, the contracting company will pay for both launches plus a bonus of $800,000. Using a present worth analysis (PW) with a MARR of 7.00 percent/year, what should Calisto Launch Services do?

(Do all calculations to 5 decimal places and round final answer to 2 decimal places in terms of k (1 k = 1,000). Tolerance is +/- 1.00.

(I) Calculate PW of first satellite
$

(in thousands)


(II) Calculate PW of second satellite
$

(in thousands)


(III) Calculate PW of both satellites
$

(in thousands)

In: Finance