Questions
CREATE TABLE DRIVER( ENUM         DECIMAL(12) NOT NULL, LNUM         DECIMAL(8)    NOT NULL,...

CREATE TABLE DRIVER(
ENUM         DECIMAL(12) NOT NULL,
LNUM         DECIMAL(8)    NOT NULL,
STATUS         VARCHAR(10) NOT NULL,
CONSTRAINT DRIVER_PKEY PRIMARY KEY(ENUM),
CONSTRAINT DRIVER_UNIQUE UNIQUE(LNUM),
CONSTRAINT DRIVER_FKEY FOREIGN KEY(ENUM) REFERENCES EMPLOYEE(ENUM),
CONSTRAINT DRIVER_STATUS CHECK ( STATUS IN ('AVAILABLE', 'BUSY', 'ON LEAVE')) );

(1)   Modify a consistency constraint of the sample database such that after a modification
        it is possible to record in the database information about the drivers who are sick.   */

CREATE TABLE TRUCK(
REGNUM         VARCHAR(10) NOT NULL,
CAPACITY    DECIMAL(7)    NOT NULL,
WEIGHT         DECIMAL(7)    NOT NULL,
STATUS         VARCHAR(10) NOT NULL,
CONSTRAINT TRUCK_PKEY PRIMARY KEY(REGNUM),
CONSTRAINT TRUCK_STATUS CHECK ( STATUS IN ('AVAILABLE', 'USED', 'MAINTAINED')),
CONSTRAINT TRUCK_WEIGHT CHECK ( WEIGHT > 0.0 AND WEIGHT < 500000 ),
CONSTRAINT TRUCK_CAPACITY CHECK ( CAPACITY > 0.0 AND CAPACITY < 100000 ) );

2. Modify a structure and consistency constraint of the sample database such that after
        a modification it is possible to add information about the total number of repairs
        performed on each truck. Assume that, a truck cannot be repaired more than 1000 times.

CREATE TABLE TRIP(
TNUM         DECIMAL(10) NOT NULL,
LNUM         DECIMAL(8)    NOT NULL,
REGNUM         VARCHAR(10) NOT NULL,
TDATE       DATE    NOT NULL,
CONSTRAINT TRIP_PKEY PRIMARY KEY (TNUM),
CONSTRAINT TRIP_CKEY UNIQUE (LNUM, REGNUM, TDATE),
CONSTRAINT TRIP_FKEY1 FOREIGN KEY (LNUM) REFERENCES DRIVER(LNUM),
CONSTRAINT TRIP_FKEY2 FOREIGN KEY (REGNUM) REFERENCES TRUCK(REGNUM) );

3. Modify a structure and consistency constraint of the sample database such that after
        a modification it is possible to store in the database optional information about
        the cost of each trip. Assume, that cost of a single trip is a positive number not
        greater that 9999.99.

In: Computer Science

JAVA Please: Lab9B: MicroDB. In Lab9A, each method returned an integer. In this part of the...

JAVA Please:

Lab9B: MicroDB. In Lab9A, each method returned an integer. In this part of the lab, all methods will have a void return type and take in an array of integers as a parameter. You’re going to write a program that creates a mini database of numbers that allows the user to reset the database, print the database, add a number to the database, find the sum of the elements in the database, or quit. In main, you will declare an array of 10 integers (this is a requirement). Then you will define the following methods: • printArray (int[ ] arr) – this takes in an array and prints it • initArray (int[ ] arr) – this initializes the array so that each cell is 0 • printSum (int[ ] arr) – this calculates the sum of the elements in the array and prints it • enterNum(int[ ] arr) – this asks the user for a slot number and value – putting the value into the array in the correct slot • printMenu (int[ ] arr) – prints the menu in the sample output (that’s it, nothing more) Note: C++ folks – if you want to pass the size of the array as a second parameter, you can. In main, create an array of 10 integers and immediately call initArray( ). Then, continuously looping, print the menu and ask the user what they want to do – calling the appropriate methods based on the user’s choice. Note that every time you call a method, you must pass the array that was created in main. If it makes it easier, we used a do-while loop and a switch statement in main. In our implementation, main was only 15 lines of code

Sample output #1

Would you like to:

1) Enter a number

2) Print the array

3) Find the sum of the array

4) Reset the array

5) Quit

etc...

In: Computer Science

Make this simple C++ code add data into a file called "Medical Database" preferably an excel...

Make this simple C++ code add data into a file called "Medical Database" preferably an excel file.

Also ask the patient for blood type and if they're donors.

Anytime I run this code, it should add new data into the same Medical Database file.

Use comments to explain what each line of code is doing. (including the one I have written)

Side note: I'm trying to explain how data mining works in the medical field and the medical database file is acting a the real database hospitals use for patients.

*Also if can you put a note explaining steps taken to put real data into a real Database. API calling or anything.*

#include<iostream>

#include<string>

using namespace std;


int main() {

string name;

int sytolic,diastolic;

sytolic=diastolic=0;

cout<<"Enter name of Patient: ";

getline(cin,name);

cout<<"Enter "<<name<<"'s sytolic number: ";

cin>>sytolic;

cout<<"Enter "<<name<<"'s diastolic number: ";

cin>>diastolic;

cout<<"Below is "<<name<<"'s blood pressure rating: "<<endl;

cout<<"----------------------------------------------"<<endl;

cout<<"Name of Patient: "<<name<<endl;

cout<<"Blood Pressure Ratings: "<<sytolic<<"/"<<diastolic<<endl;

if(sytolic<120 && diastolic<80)

cout<<"Blood Pressure Category: Normal"<<endl;

if(120<=sytolic && sytolic<=129 && diastolic<80)

cout<<"Blood Pressure Category: Elevated"<<endl;

if((130<=sytolic && sytolic<=139) || (80<=diastolic && diastolic<=89))

cout<<"Blood Pressure Category: HBP - Stage 1"<<endl;

if((140<=sytolic) || (90<=diastolic))

cout<<"Blood Pressure Category: HBP - Stage 2"<<endl;


}

In: Computer Science

I need this in JAVA Lab9B In each method returned an integer. In this part of...

I need this in JAVA

Lab9B In each method returned an integer. In this part of the lab, all methods will have a void return type and take in an array of integers as a parameter. You’re going to write a program that creates a mini database of numbers that allows the user to reset the database, print the database, add a number to the database, find the sum of the elements in the database, or quit.

In main, you will declare an array of 10 integers (this is a requirement). Then you will define the following methods:

• printArray (int[ ] arr) – this takes in an array and prints it

• initArray (int[ ] arr) – this initializes the array so that each cell is 0

• printSum (int[ ] arr) – this calculates the sum of the elements in the array and prints it

• enterNum(int[ ] arr) – this asks the user for a slot number and value – putting the value into the array in the correct slot

• printMenu (int[ ] arr) – prints the menu in the sample output (that’s it, nothing more)

In main, create an array of 10 integers and immediately call initArray( ). Then, continuously looping, print the menu and ask the user what they want to do – calling the appropriate methods based on the user’s choice. Note that every time you call a method, you must pass the array that was created in main. If it makes it easier, we used a do-while loop and a switch statement in main. In our implementation, main was only 15 lines of code.

Sample output #1 Would you like to:

1) Enter a number

2) Print the array

3) Find the sum of the array

4) Reset the array

5) Quit

1

Enter the slot: 5

Enter the new value: 76

Would you like to: 1)

Enter a number 2)

Print the array 3)

Find the sum of the array 4)

Reset the array 5)

Quit

In: Computer Science

Using economic theory and based on your knowledge of the Irish labour market, outline the various...

Using economic theory and based on your knowledge of the Irish labour market, outline the various factors driving Ireland's need to update the skills of its workforce.

In: Economics

From this information: the following code, explain which statements are instructions, which are assembly directives, which...

From this information: the following code, explain which statements are instructions, which are assembly directives, which are labels, and which are comments: ;"this"program"adds"3"to address $2000"and"increments"Accumulator"B """"""""

org"$4000

ldaa"$2000

adda"#3 ;"

add"3"to"(A)"

staa"$2000

incb ; increment"B

In: Computer Science

Stealcase’s Balance Sheet, as of December 31(thousands of dollars)                                 

Stealcase’s Balance Sheet, as of December 31(thousands of dollars)   

                                          2017      2018                                                                            2017      2018

Cash                                 30            25                  Account Payable                                  35          50

Accts Receivable          5              20                  Bank Loan                                            25           25

Inventory                        100         100                Accrued Taxes                                   15          25

Current Assets              135          245                Long Term, Dept current portion    12         12

                                                                                 Current Liabilities                                87         112

Net Plant & Equip           200          250                 Long-Term Dept                                100        95

                                                                                 Common Stock (10,000 shares)    100      100

                                                                                Additional paid-in capital                 38          38

                                                                                Retained Earnings                        10          150

Total Assets                   335        495                 Total Liabilities & Equity                          335        495

…………………………………………………………………………………..

Stealcase’s Income Statement (thousands of dollars)   

                                  2017          2018                                                                         2017          2018

Sales                        1200           2000                  Cost of Goods Sold                    750            1200

Gross Profit           450             800                  Operating Expenses                   350              500          

Interest Expense 50               90            

    

Profit (loss) Before

Taxes                       20               210                   Income Taxes                                  40                  70

Net Profit                 10              140

Statement of Retained Earnings 12/31/2018 (thousands of dollars)   

Retained Earnings, 12/31/17                        $       10

Net Income                                                               140

Dividends                                                                     0

                                                                            ________________

Retained Earnings, 12/31/18                               150

.....................................................................

  1. What is the 2018 current ratio?
  1. 2.28
  2. .46
  3. 2.19
  4. .64
  5. 4.42

  1. On the Statement of Retained Earnings, by how much did Retained Earnings increase in 2018?
  1. $10,000
  2. 140,000
  3. $10
  4. $140
  5. $150,000

  1. What id the 2018 Dept to Equity ratio?
  1. .72
  2. .33
  3. .56
  4. .42
  5. .39

  1. What is the 2017 return on equity? (round to the nearest percentage point)
  1. 3%
  2. 25%
  3. 28%
  4. 49%
  5. 7%

  1. What is the 2018 quick ratio?
  1. .07
  2. 2.49
  3. .46
  4. 40
  5. Some other amount

  1. What is the 2017 Net Profit Margin? (round to the neatest percent)
  1. 7%
  2. 4%
  3. 11%
  4. 1%
  5. 38%

  1. What is the 2017 Average Collection Period/Days Sales Outstanding?
  1. 1.52
  2. 3.65
  3. .04
  4. .27
  5. .66

  1. What is the 2018 times interest earned ratio? (rounded to the nearest whole number)
  1. 16
  2. 3
  3. 7
  4. 6
  5. 9

  1. For the year just ended, 2018, do you think the company is performing well?
  1. There is no way to judge if this company is doing well.
  2. Yes. Inventory turnover is increasing and ROA is increasing.
  3. No. Retained earnings is increasing and total asset turnover is decreasing.
  4. Yes. ROE is increasing and Gross Margin is increasing.
  5. No. Liabilities are increasing and taxes are increasing.

  1. As a creditor what concerns might you have about this company?
  1. Debt to equity ratio too low
  2. Quick ratio low
  3. Return on Equity too low
  4. Times interest earned too high
  5. Total debt ratio too low

In: Finance

Corn. The average yield of corn (bushels per acre) for Iowa counties during 2019 can be...

Corn. The average yield of corn (bushels per acre) for Iowa counties during 2019 can be described by a Normal distribution with a mean of 180.5 bushels per acre and a standard deviation of 16.8 bushels per acre. Use the 68-95-99.7 Rule (Empirical Rule) to answer the following questions.

(a) Create a well labeled normal curve for the average corn yield (bushels per acre) for Iowa counties during 2018. On this graph numerically label the mean (iv), the center 68% (iii) and (v), the center 95% (ii) and (vi) and the center 99.7% (i) and (vii)

(b) The middle 95% of counties have a corn yield between what two values?

(c) What is the value of the 16th percentile of corn yield for counties in Iowa?

(d) What proportion of counties have a corn yield between 146.9 and 197.3 bushels per acre?

(e) 0.15% of counties have a corn yield more than or equal to what value?

(f) What proportion of counties have a corn yield of at most 214.1 bushels per acre?

In: Statistics and Probability

Barrett Corporation manufactures leather products. The corporation uses a non-contributory, defined benefit pension plan for its...

Barrett Corporation manufactures leather products. The corporation uses a non-contributory, defined benefit pension plan for its 230 employees.

The footnote to the financial statements relating to the pension plan, in part, stated:

Note J. The company has a defined benefit pension plan covering substantially all of its employees. The benefits are based on years of service and the employee’s compensation during the last four years of employment. The company’s funding policy is to contribute annually the maximum amount allowed under the tax law. Contributions are intended to provide for benefits expected to be earned in the future as well as those earned to date.

The net periodic pension expense on Barrett Corporation’s comparative income statement showed an increase between 2016 and 2017.

The corporation provided the following information related to its defined benefit pension plan at December 31, 2018:

Defined benefit obligation

$2,737,000

Fair value of plan assets

2,278,329

Accumulated OCI – Net loss (1/1/18 balance: –0–)

34,220

Other pension data

Service cost for 2018

94,000

Actual return on plan assets in 2018

130,000

Interest on January 1, 2018, defined benefit obligation

164,220

Contributions to plan in 2018

93,329

Benefits paid

140,000

Discount (interest) rate

6%

The new CEO, Patricia Wright, while reviewing the previous three year’s financial statements with the Controller, Helen Stewart, had some concerns. Given that Barrett Corporation’s work force has been stable for the last 6 years, Patricia could not understand the increase in the net periodic pension expense between 2016 and 2017. Helen explained that the net periodic pension expense consists of several elements, some of which may increase or decrease the net expense.

Prepare the note disclosing the components of pension expense for the year 2018.

Net income for 2018 is $35,000. Determine the amounts of other comprehensive income and comprehensive income for 2018.

Compute accumulated other comprehensive income reported at December 31, 2018.

In: Accounting

On the planet Homogenia every consumer who has ever lived consumes only two goods, x and...

On the planet Homogenia every consumer who has ever lived consumes only two goods, x and y, and has the utility function U( x, y) = xy. The currency in Homogenia is the fragel. In this country in 1900, the price of good 1 was 1 fragel and the price of good 2 was 2 fragels. Per capita income was 108 fragels in 1990. In 2000, the price of good 1 was 3 fragels and the price of good 2 was 4 fragels and per capita income increased to 120

a. The quantity of x that's consumed in 1990 and 2000 are: ______ and _______respectively

b. The quantity of y that's consumed in 1990 and 2000 are: ______. and ______ respectively

c. The Laspeyres quantity index for the quantity level in 2000 relative to the price level in 1900 is. ___________ (rounded to 2 decimals)

d. The Paasche quantity index for the quantity level in 2000 relative to the price level in 1900 is ____________(rounded to 2 decimals)

e. The Laspeyres price index for the price level in 2000 relative to the price level in 1900 is _____________ (rounded to 2 decimals)

f. The Paasche price index for the price level in 2000 relative to the price level in 1900 is ___________ (rounded to 2 decimals).

In: Economics