Questions
Define the class HotelRoom. The class has the following private data members: the room number (an...

Define the class HotelRoom. The class has the following private data members: the room number (an integer) and daily rate (a double). Include a default constructor as well as a constructor with two parameters to initialize the room number and the room’s daily rate. The class should have get/set functions for all its private data members [20pts]. The constructors and the get/set functions must throw an invalid_argument exception if either one of the parameter values are negative. The exception handler should display the message “Negative Parameter” [20pts]. Include a toString() function that nicely formats and returns a string that displays the information about the hotel room [10pts].

  1. Write a main function to test the class HotelRoom, create a HotelRoom object. Try to set the room rate to an invalid value to generate an exception. Invoke the toSting() function to display the HotelRoom object. [20pts]
  2. Derive the classes GuestRoom form the base class HotelRoom. The GuestRoom has private data fields and public functions:
    1. The private data field capacity (an Integer) that represents the maximum number of guests that can occupy the room. [5pts]
    2. The private data member status (an integer), which represents the number of guests in the room (0 if unoccupied). [5pts]
    3. An integer data field days that represents the number of days the guests occupies the room. [5pts]
    4. Add constructors and get/set functions to the GuestRoom class. The set function for the status data member must throw an out_of_range exception if it tries to set status to value greater than the capacity. [30pts]
    5. The function calculateBill() that returns the amount of guest’s bill. [10pts]
    6. Redefine the function toString() that formats and returns a string containing all pertinent information about the GuestRoom. [15pts]
  3. Derive the classes MeetingRoom form the base class HotelRoom. The class has the following private data filed sand public functions:
    1. A private data field seats, which represents the number of seats in the room. [5pts]
    2. An integer data field status (1 if the room is booked and 0 otherwise). [5pts]
    3. Add constructors and get/set functions to the GuestRoom class. [10pts]
    4. Redefine the function toSting() to format and return a string containing all pertinent information about the MeetingRoom. [20pts]
    5. The function CalculateBill(), which returns the amount of the bill for renting the room for one day. The function calculates the bill as follows: the number of seats multiplied by 10.00, plus 500.00. [20pts]
  4. Write a main function to test the classes GuestRoom and MeetingRoom. Invoke the calculateBills and toStirng() in each of the objects. [40pts]

In: Computer Science

Ben's Chia Seeds does not feel satisfied with the location and amount of shelf space it...

Ben's Chia Seeds does not feel satisfied with the location and amount of shelf space it is given at Super Healthy Food Markets. This creates a source of

a. vertical conflict.

b. diagonal conflict.

c. horizontal conflict.

d. parallel conflict.

e. placement conflict.

2. Molson Coors is evaluating an idea for a new bottled water by using focus groups made up of young consumers to suggest brand names for the proposed product. This is an example of:

a

empowerment.

b

concept testing.

c

market testing.

d

TQM.

e

EDI.

3. U. S. Steel produces steel products used in automobiles and various other products. U. S. Steel's products are selling so well that it has decided to buy new equipment that will increase its production capacity. This example best illustrates

a

why the demand for a particular seller's equipment is inelastic.

b

derived demand.

c

why the industry demand for this kind of equipment is quite elastic.

d

that the market for installations is a "boom or bust" business.

e

All of the above are true.

4. Which of the following is FALSE?

a

Not every firm has a complete MIS.

b

An MIS tends to focus on recurring information needs.

c

An MIS identifies problems that need solving.

d

It is the job of the MIS specialist to ask for the right information in the right form.

e

An MIS shouldn't be the only source of information for managers while making decisions.

5. Susan Stewart had Ethan Allen brand living room furniture and wanted to buy a particular chair of the same brand. She made a few calls to find a store that had the chair in stock. When she found one, she went there and purchased the chair. For Susan, the chair was

a

a homogeneous shopping product.

b

a specialty product.

c

an impulse product.

d

a heterogeneous shopping product.

e

an emergency product.

In: Operations Management

Li Ltd requires you to determine, for the two  scenarios below, the ‘cash and cash equivalents’ amount...

Li Ltd requires you to determine, for the two  scenarios below, the ‘cash and cash equivalents’ amount to include in its Statement of Cash Flows.

Scenario 1

Scenario 2

Cash at bank

$20 000

$33 000

Short term investment (45 day)

-

$70 000

Foreign bank account  (insignificant risk of change in value)

3 000

-

Short term investment (120 day)

10 000

-

Redeemable preference shares  (redeemable in three years)

-

3 500

Petty cash

-

50

Bank overdraft

7 680

-

Redeemable preference shares  (redeemable in 60 days)

-

15 000

Cash and cash equivalents =

$

$

In: Accounting

System Disorder Template: Newborn Menigitis

System Disorder Template: Newborn Menigitis

In: Nursing

3. Planet Z has diameter 1.8 × 107 m. On the planet's surface, the acceleration due...

3.

Planet Z has diameter 1.8 × 107 m. On the planet's surface, the acceleration due to gravity is 19.5 m/s2. What is the mass of the planet? Note: The constant of universal gravity (G) equals 6.674 × 10-11 N ⋅ m2/kg2.

2.4 × 1025 kg

7.0 × 1025 kg

8.4 × 1025 kg

4.3 × 1025 kg

4.

As shown in the diagram, two massless wires connect a rotating pole to a sphere.The sphere has mass 7.2 kg and it revolves in a horizontal circle at constant speed. At this particular speed the tension is the same in both wires. What is the speed of the ball?

2.9 m/s

4.0 m/s

5.7 m/s

4.6 m/s

5.

Two people, each of mass 85 kg, are positioned 8.0 m away from each other. What is the magnitude of the gravitational attraction between them? Note: The constant of universal gravity (G) equals 6.674 × 10-11 N ⋅ m2/kg2.

1.1 × 103 N

7.5 × 10-9 N

8.9 × 10-11 N

6.0 × 10-8 N

7.1 × 10-10 N

6.

A racecar experiences a centripetal acceleration of 36.0 m/s2 as it travels at a constant speed of 27.0 m/s along a circular arc. What is the radius of the circle?

0.18 m

20 m

9.3 m

14 m

7.

A particle travels in a circle of radius 76 cm and completes one revolution in 4.5 s. What is the centripetal acceleration of the particle?

1.5 m/s2

0.97 m/s2

3.3 m/s2

2.8 m/s2

10.

Satellite B revolves around Earth 4 times a day. What is the radius of its orbit, measured from Earth's center? Assume that Earth generates the only significant gravitation attraction on the satellite. Note: The mass of Earth is 5.98 × 1024 kg, and the constant of universal gravity (G) equals 6.674 × 10-11 N ⋅ m2/kg2.

1.68 × 107 m

6.03 × 106 m

2.11 × 107 m

6.70 × 107 m

11.

An astronaut has weight W on Earth. The astronaut travels to a planet that has a mass 4 times greater than Earth's mass, and its radius is 2 times greater than Earth's radius. What is the astronaut's weight on the planet?

4W

0.5W

W

2W

12.

The gravitational acceleration at the surface of planet X is 11.6 m/s2, and the radius of the planet is 66,500 km. An astronaut is hovering at height h above the planet's surface, and she notices her weight is the same as it is on Earth. What is h?

8200 km

7000 km

5800 km

9400 km

13.

Earth's radius is 6380 km. An object is dropped from a height 622 km above Earth's surface. What is its initial acceleration in terms of g, the acceleration constant due to gravity at Earth's surface?

0.375g

0.831g

1.33g

0.426g

14.

At the top of a looped section of roller coaster track, the car and rider are completely upside down. What information is necessary to calculate the minimum speed of the car that will prevent a rider from falling out of it? Assume the rider is not strapped into the car.

the radius of the loop, the mass of the rider. and the mass of the car

the radius of the loop

the mass of the rider and the width of the track

the radius of the loop and the mass of the rider

In: Physics

criticisms of big 5 personality model

criticisms of big 5 personality model

In: Psychology

what are the technology impacts on finance, and government?

what are the technology impacts on finance, and government?

In: Computer Science

Which of the following species represents an exception to the octet rule? A. CO2 B. BF3...

Which of the following species represents an exception to the octet rule?

A.

CO2

B.

BF3

C.

SiO2

D.

PCl3

In: Chemistry

Discuss the advantages of cloud-based solutions of your choosing. Give an example of each and describe...

Discuss the advantages of cloud-based solutions of your choosing. Give an example of each and describe how you've seen cloud-based solutions in action. Some examples; may include communication tools (Email, Skype and WhatsApp), productivity (Microsoft Office 365 and Google Docs), business process (Salesforce and HubSpot), backup and recovery (Dropbox and Google Drive) and social media (Facebook, LinkedIn and Twitter).

In: Computer Science

Given an n × n matrix A, write a function that carries out LU factoriza- tion...

Given an n × n matrix A, write a function that carries out LU factoriza- tion without row pivoting. Note that this will be different from the built-in Matlab function lu, which does do row pivoting. (Using MATLAB)

In: Computer Science

How do you assess the age of imperialism/colonial rule? What were the global consequences of imperialism?

How do you assess the age of imperialism/colonial rule? What were the global consequences of imperialism?

In: Psychology

How to get the vote count to display in another activity? This is for android studio...

How to get the vote count to display in another activity? This is for android studio with Java codes.

private int yesVoteCount = 0;
    private int noVoteCount = 0;
    private int resetVotes = 0;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        // Use res ID to retrieve inflated objects and assign to variables
        mYesButton = findViewById(R.id.yes_button);
        mNoButton = findViewById(R.id.no_button);
        mResetButton = findViewById(R.id.reset_button);
        mSurveyQuestion = findViewById(R.id.survey_question);
        mYesCount = findViewById(R.id.yes_count);
        mNoCount = findViewById(R.id.no_count);

        if (savedInstanceState != null) { // Saving data
            yesVoteCount = savedInstanceState.getInt(YES_INDEX, yesVoteCount);
           noVoteCount = savedInstanceState.getInt(NO_INDEX, noVoteCount);

            mYesCount.setText(String.valueOf(yesVoteCount));
            mNoCount.setText(String.valueOf(noVoteCount));
        }
        // Listener method for when button is clicked
        mYesButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                addVote();
            }
        });

        mNoButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                addVote();
            }
        });
        // Resetting vote count
        mResetButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                mYesCount.setText(String.valueOf(resetVotes)); //Resetting votes to zero
                mNoCount.setText(String.valueOf(resetVotes));
                yesVoteCount = 0; // Resetting variable back to zero
                noVoteCount = 0;
            }
        });
    }
    // Add vote when button is pressed
    private void addVote() {
        if (mYesButton.isPressed()) {
            yesVoteCount++;
            mYesCount.setText(String.valueOf(yesVoteCount)); // Adding votes
        } else if (mNoButton.isPressed()) {
            noVoteCount++;
            mNoCount.setText(String.valueOf(noVoteCount));
        }
    }
    // Data restore upon rotation
        @Override
        protected void onSaveInstanceState(Bundle outBundle) {
            super.onSaveInstanceState(outBundle);
            outBundle.putInt(YES_INDEX, yesVoteCount);
            outBundle.putInt(NO_INDEX, noVoteCount);
        }

In: Computer Science

1.) Outline and detail a PESTEL analysis. What, in your opinion, is currently the strongest component...

1.) Outline and detail a PESTEL analysis. What, in your opinion, is currently the strongest component of the macro-environment? Why? How has this changed?

Your answers will be short essays and should be three full paragraphs or longer.

In: Operations Management

Calculate the pH of a solution prepared by mixing 300mL of 0.25M sodium hydrogen ascorbate and...

Calculate the pH of a solution prepared by mixing 300mL of 0.25M sodium hydrogen ascorbate and 150mL of 0.2M HCl plus water to a final volume of 1 liter. The Ka of ascorbic acid is 5.0 x 10^-5

In: Chemistry

Vittoria Ltd requires a Statement of Cash Flows to be prepared for the year ended 31...

Vittoria Ltd requires a Statement of Cash Flows to be prepared for the year ended

31 March 2018, the following information has been collected for this purpose.

Vittoria Ltd Balance Sheets as at 31 March

2017

2018

Cash

$176 000

$239 000

Accounts receivable

220 000

280 000

Allowance for doubtful debts

(30 000)

(40 000)

Inventory

90 000

100 000

Plant and equipment

900 000

1 074 000

Accumulated depreciation

(80 000)

(100 000)

Total assets

$1 276 000

$1 553 000

Accounts payable

80 000

70 000

Interest payable

1 000

2 000

Income tax payable

76 000

88 000

Long term loans

109 000

148 000

Share capital

400 000

500 000

Asset revaluation surplus

-

30 000

Retained earnings

610 000

715 000

Total equity and liabilities

$1 276 000

$1 553 000

Vittoria Ltd SCI for the year ended 31 March 2018:

Sales

$885 000

Less expenses:

   COGS

240 000

  Depreciation expense

90 000

   Interest expense

6 000

   Doubtful debts expense

40 000

   Salaries and wages expense

200 000

   Income tax expense

84 000

  Other expenses

120 000

Profit after tax

105 000

OCI: Revaluation gain

30 000

TCI

$135 000

Question 2 continued:

Additional information:

Vittoria Ltd classifies interest expense and dividends paid as cash outflows from financing activities.

Plant and equipment, with a fair value of $100 000, has been acquired by the issue of

$100 000 worth of fully paid Vittoria Ltd shares to the sellers of the plant and equipment.

During the year, equipment that originally cost $100 000 was sold for $30 000 cash.

Plant and equipment was revalued upwards by $30 000.

A long-term loan of $30 000 was specifically organised for the purchase of plant and equipment costing $30 000.  

Required:

(i) Prepare the general ledger accounts as required in the answer booklet.

(ii) Prepare a statement of cash flows for Vittoria Ltd, for the year ended 31 March 2018, in accordance with NZ IAS 7 Statement of Cash Flows. Vittoria Ltd uses the indirectmethod for the cash flows from operating activities (CFOA) section.  

(iii) Prepare a statement of cash flows for Vittoria Ltd, for the year ended 31 March 2018, in accordance with NZ IAS 7 Statement of Cash Flows. Vittoria Ltd uses the directmethod for the cash flows from operating activities (CFOA) section. Complete the necessary reconciliation, as required by NZ FRS-44, to be included in the notes.

(iv) Explain, by completing the table in the answer booklet, how your answers to (ii) and (iii) above would changeifVittoria Ltd classified interest expense paid as a cash outflow from operating activities.

                                                                                                                                                                            

(v) Vittoria Ltd has provided you with 15 types of cash inflows and cash outflows in the answer booklet and requires you to determine where they should be included in the Statement of Cash Flows in accordance with NZ IAS 7 Statement of Cash Flows. AssumeVittoria Ltd uses the direct method for CFOA.  Hint: Remember certain cash flows have a choice of classification; for these particular cash flows highlight the two choices available.

CFOA = cash flows from operating activities, CFIA = cash flows from investing activities and CFFA = cash flows from financing activities.                                                                                                    

In: Accounting