Questions
Given a string str of even length, print out the first half.   Methods to use: substring(),...

Given a string str of even length, print out the first half.  

Methods to use: substring(), length()

Testing cases:

WooHoo => Woo

HelloThere   => Hello

abcdef => abc

ab   => a

0123456789   => 01234

kitten   => kit

(Note that the sample input test cases are shown before the “=>” and the expected output each test case is after the “=>”.

Your program should print out the expected output only, not the input.)


this is for java language

In: Computer Science

After a company has been incorporated, it has to apply for a certificate to commence business...

After a company has been incorporated, it has to apply for a certificate to commence business before it can start operating formally. Outline the information that has to be provided in the returns filed with the Registrar of Companies.
b. The Registrar of Companies is empowered to call on a company to produce for his inspection all or any of the books of the company. Explain the circumstances under which the Registrar may exercise such powers.
c. Explain any five advantages of registration of a company.

In: Operations Management

Suppose GDP is $12 trillion, taxes are $3.6 trillion, privatesaving is $1.5 trillion, and public...

Suppose GDP is $12 trillion, taxes are $3.6 trillion, private saving is $1.5 trillion, and public saving is $0.8 trillion.

Assuming the economy is closed, complete the following table by calculating consumption, government purchases, national saving, and investment.

Componentamount(trillions of dollars)
consumption
government purchases
national savings
investment

In: Economics

An R-C circuit with R = 100 ohm and C = 3 mF is connected to...

An R-C circuit with R = 100 ohm and C = 3 mF is connected to a 90 V source of emf. At t = 0 the switch is closed and the capacitor begins to charge.

a) How much energy (in J) is stored in the capacitor at t = 0.7 s?

b) What is the largest amount of energy that can be store in the capacitor?

In: Physics

Consider the following scenario. You grab a box of cereal from your pantry, and you carry...

Consider the following scenario. You grab a box of cereal from your pantry, and you carry it over to your table. When you get there, you change your mind and return the box of cereal to its original spot. Is this a reversible process if the closed system is your house/apartment? Explain your answer

In: Physics

A mole of air is sampled from the atmosphere when the atmospheric pressure is 765 mm...

A mole of air is sampled from the atmosphere when the atmospheric pressure is 765 mm Hg, the

temperature is 25 C, and relative humidity is 75%. The sample of air is placed inside a closed container

and heated to 135 C and then compressed to 2 atm. What are the relative humidity, the humidity, and the mole fraction of water in the compressed air?

In: Chemistry

1)What is energy? Is it conserved, and how is this conservation different than momentum? 2) What...

1)What is energy? Is it conserved, and how is this conservation different than momentum?

2) What is the difference between a closed system and an isolated system?

3) What is the difference between elastic, inelastic, totally inelastic, and super-elastic collision?

4) What is Mazur's notation for relative velocity and what is relative velocity anyway?

In: Physics

What is a CpG island, and how is it relevant to this topic? List three distinct...

  1. What is a CpG island, and how is it relevant to this topic?
  2. List three distinct places/steps in gene expression that gene regulation can occur in eukaryotes (possibilities).

3 Define “chromatin remodeling’, “open chromatin” and “closed chromatin"

4.What is the SWI/SNF complex and what does it do?

Ill Rate High

In: Biology

true or false IMPLICIT COSTS DO NOT REQUIRE CASH OUTLAYS BUT ARE OVERHEAD EXPENSES. THE LONG...

true or false

  1. IMPLICIT COSTS DO NOT REQUIRE CASH OUTLAYS BUT ARE OVERHEAD EXPENSES.

  1. THE LONG RUN PHILLIPS CURVE IS A VERTICAL LINE CURVE AND IS INDEPENDENT OF INFLATION.

  1. INTERNATIONAL TRADE= OPEN SYSTEM = GLOBALIZATION = GLOBAL MANAGEMENT

  1. PROTECTIONISM = CLOSED SYSTEM = AUTARKY

  1. BUDGET SURPLUS= TAX REVENUES > G AND CONTRIBUTES TO ECONOMIC GROWTH.

In: Economics

Which of the following is not an example of a chemical hazard? toxic by-products, such as...

Which of the following is not an example of a chemical hazard?

toxic by-products, such as vapors and fumes, caused by mixing incompatible materials

skin irritation, disfiguring burns, eye injury or blindness caused by corrosive products

pressure build up in a closed system has the potential for explosion/implosion

injury from exploding containers, such as spray cans

In: Chemistry