Question

In: Computer Science

You are part of the IT Department at the newly established 200-bed Hospital Puteri Bestari in...

You are part of the IT Department at the newly established 200-bed Hospital Puteri Bestari in Ipoh, Perak. The hospital decided to have an in-house inventory system for all of its assets. Write a short program that accepts the inventory tagging number, and store it in a global array named ASSET_NUMBER. The array must be able to store up to 100 assets, and the tagging number is a 7-digit integer. The program should not overwrite existing data in the array, and must first find an empty element before storing the integer at that location.

USE ONLY C++!!

Solutions

Expert Solution

Global variable has global scope. In our given program we will be declaring a global array to store the tagging number

We will also have a counter variable which will help us track the number of elements currently in the array and the next location where the new input should be added.

Solution:

#include <iostream>

using namespace std;

// array of size 100
int ASSET_NUMBER[100];

int main()
{
    // counter to keep track of index
    int curr = 0;
    
    int tag;
    
    while(true) {
        // get user input of the inventory tag
        cin >> tag;
        
        // store it in the inventory array
        ASSET_NUMBER[curr] = tag;
        
        // increment the counter
        curr++;
    }

    return 0;
}

Screenshot of the code and sample output from an IDE:


Related Solutions

You are the newly appointed CEO of a 300-bed community hospital in the Midwest. During your...
You are the newly appointed CEO of a 300-bed community hospital in the Midwest. During your first week on duty, your board president and your chief of medical staff both express the same concern to you about the hospital staff: They just don’t seem to be very motivated in performing their duties these days. Quality of care and patient satisfaction are suffering as a result. What will you do to set about improving motivation within your healthcare professional team? Explain...
You are the manager of a clinical laboratory at a mid-size (200-bed) community hospital. Physicians and...
You are the manager of a clinical laboratory at a mid-size (200-bed) community hospital. Physicians and nurses are concerned about the turnaround time for laboratory tests ordered on early morning rounds. To determine where there might be "waste" in the laboratory process, which is causing increased turnaround time, create a Spaghetti diagram of the process from the time that a test is ordered to the time that the test result is reported out.
You have recently been hired by Middleton Manufacturing to work in the newly established treasury department....
You have recently been hired by Middleton Manufacturing to work in the newly established treasury department. Middleton Manufacturing is a small company with disorganized systems and the finance area needs work. The company currently has a beginning cash balance of $100,000 and plans to buy new machinery during the fourth quarter for $500,000, paying cash. The company maintains a minimum cash balance of $100,000 and invests any excess cash in a money market account. The company borrows short-term from CIBC,...
You have recently been hired by Piepkorn Manufacturing to work in a newly established treasury department....
You have recently been hired by Piepkorn Manufacturing to work in a newly established treasury department. Piepkorn Manufacturing is a small company that produces cardboard boxes in a variety of sizes for different purchasers. Gary Piepkon, the owner of the company, works primarily in the sales and production areas of the company. Currently, the company puts all receivables in one shoe box and all payables in another. Because of the disorganized system, all finance area needs work, and that’s what...
Jason Michaels has just been hired as CEO of Redstone Memorial Hospital, a 200 bed community...
Jason Michaels has just been hired as CEO of Redstone Memorial Hospital, a 200 bed community hospital in an affluent suburban location. Redstone has an excellent reputation in its community, but the hospital has not changed its business strategy or strategic focus or services in 20 years. As a result, although the hospital excels at “bread and butter” inpatient care (e.g., normal deliveries, appendectomies), it has not developed the medical staff, technology etc. necessary to provide state-of-the-art service for “big...
vGordon County Hopsital In a remote part of the county Gordon County Hospital has established a...
vGordon County Hopsital In a remote part of the county Gordon County Hospital has established a clinic that provides two basic types of services, routine office visits (ROV) and emergency care (EC). Because you impressed the CEO with your work on costing at the hospital, you were asked to cost out services at the remote clinic. Because you feel that ABC Costing enables a better understanding of the cost dynamics in any entity, you decided to employ ABC for this...
You are the CFO for a 400-bed hospital in your community. You have been asked to...
You are the CFO for a 400-bed hospital in your community. You have been asked to present information to the local business organization on financial information and its importance to the stability of any business. You have been presented a list of questions from the group to answer in your presentation: What is the importance of financial information to the hospital? Who are the various users of the hospital financial information and how is the information used in healthcare decision...
You are the CFO of a 400-bed hospital in Texas and having trouble with your bottom...
You are the CFO of a 400-bed hospital in Texas and having trouble with your bottom line and staying within budget. As part of your continued efforts to train your department directors/ supervisors and board on understanding cost and how it is used in the decision process, you have set up classes to explain major concepts of cost. Explain the concept of management control and how budgeting is used as part of it. Describe the concept of zero-base budgeting. PLEASE...
Scenario: You are the HR manager of a newly established healthcare organization. The board of directors...
Scenario: You are the HR manager of a newly established healthcare organization. The board of directors of the organization asks you to prepare a presentation on the required profiles for the following roles: Administrator (chief executive officer), Physician, Registered nurse, Nurse's aide Laboratory technician, Dietary aide, Maintenance professional. For each role above, provide the following information: 1. Educational qualifications required for the role 2. Scope of practice for the role 3. Credentialing and licensure requirements for the role 4. A...
Please type your answer You are a nurse manager hired for a newly created 45-bed oncology...
Please type your answer You are a nurse manager hired for a newly created 45-bed oncology unit. Chemotherapy is to be administered by the registered nurses (RNs) who work on the unit. The expected ADC is 40. The clients admitted to the oncology unit have complex health care needs. Address these questions: 1: What factors should be considered when determining the staffing needs of the unit? Why are these factors important? 2: What process should you use to establish the...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT