The text provided does not contain any spelling, typographical, grammatical, OCR, or mathematical errors.
Added by Eric P.
Close
Step 1
Step 1: Read the text carefully to identify any errors. Show more…
Show all steps
Your feedback will help us improve your experience
Sri K and 94 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
SAMPLE CODE:- //ASMCNT JOB 1,NOTIFY=&SYSUID //CMPLNK EXEC HLASMCLG //C.SYSIN DD * ADD TITLE 'contest program' ADD CSECT ADD AMODE 31 ADD RMODE 24 * *--------------------------------------------------------------------* * * * register equates * * * *--------------------------------------------------------------------* * R0 EQU 0 register 0 BASEREG EQU 12 base register SAVEREG EQU 13 save area register RETREG EQU 14 caller's return address ENTRYREG EQU 15 entry address RETCODE EQU 15 return code EJECT * *--------------------------------------------------------------------* * * * standard entry setup, save area chaining, establish * * base register and addressibility * * * *--------------------------------------------------------------------* * USING ADD,ENTRYREG establish addressibility B SETUP branch around eyecatcher DC CL8'ADD' program name DC CL8'&SYSDATE' program assembled date SETUP STM RETREG,BASEREG,12(SAVEREG) save caller's registers BALR BASEREG,R0 establish base register DROP ENTRYREG drop initial base register USING *,BASEREG establish addressibilty LA ENTRYREG,SAVEAREA point to this program save area ST SAVEREG,4(,ENTRYREG) save address of caller's save * area ST ENTRYREG,8(,SAVEREG) save address of this program * save area LR SAVEREG,ENTRYREG point to this program savearea EJECT * *--------------------------------------------------------------------* * * * program body * * * *--------------------------------------------------------------------* OPEN (PRTLINE,OUTPUT) Open output file MVC LINE(26),MSGX PUT PRTLINE,LINE MVC LINE,BLANK LOOPINIT DS 0H SR 2,2 Clear reg 2 L 2,=F'20' Store 10 in reg 2 L 3,=F'1' Store 1 in reg 3 * LOOP DS 0H * CVD 3,PACKAREA Convert to decimal, store in packarea UNPK OUT,PACKAREA Convert to printable, store in out MVC LINE(8),OUT Move characters from out to line MVZ LINE+7(1),LINE Move zone bits PUT PRTLINE,LINE Put line in output file A 3,=F'1' Add 1 to current total in reg 3 * BCT 2,LOOP Subtract 1 from reg 2, if not zero * then go to LOOP label CLOSE (PRTLINE) Close output file * *--------------------------------------------------------------------* * * * standard exit - restore caller's registers and * * return to caller * * * *--------------------------------------------------------------------* * EXIT DS 0H halfword boundary alignment L SAVEREG,4(,SAVEREG) restore caller's save area addr L RETREG,12(,SAVEREG) restore return address register LM R0,BASEREG,20(SAVEREG) restore all regs. except reg15 BR RETREG return to caller EJECT * *--------------------------------------------------------------------* * * * storage and constant definitions. * * print output definition. * * * *--------------------------------------------------------------------* * LINE DS 0CL80 DC C' ' DC CL79' ' PRTLINE DCB DSORG=PS,DDNAME=PRTLINE,MACRF=PM, X RECFM=FB,LRECL=80 SUM DC P'01' ONE DC P'01' TOT DS PL2 OUT DC X'4040404040404040' MSGX DC CL26'Hi! I can count very fast.' BLANK DC CL80'' PACKAREA DS CL8 SAVEAREA DC 18F'-1' register save area END ADD //G.PRTLINE DD DSN=&SYSUID..OUTPUT(MYOUTPUT),DISP=SHR OUTPUT :- Hi! I can count very fast. 00000001 00000002 00000003 00000004 00000005 00000006 00000007 00000008 00000009 00000010 00000011 00000012 00000013 00000014 00000015 00000016 00000017 00000018 00000019 00000020 QUESTION :- 1. Upload the sample to your PDS IBM dataset JCL as member name ASMPGM in your JCL dataset. 2. SUBMIT it so that it will execute correctly (return code 0). It will create a member called MYOUTPUT in your OUTPUT dataset. Screen print the member ASMPGM in your JCL PDS. Also print out the member MYOUTPUT in your OUTPUT dataset. The expected result in MYOUTPUT will be: Hi! I can count very fast. 00000001 00000002 00000003 00000004 00000005 00000006 00000007 00000008 00000009 00000010 00000011 00000012 00000013 00000014 00000015 00000016 00000017 00000018 00000019 00000020 3. Now modify your program to reduce the count to 11 and print out a message at the end in caps - THIS IS MY FINAL ASSIGNMENT. 4. Screen print the modified source program ASMPGM in your JCL dataset and the MYOUTPUT member in your OUTPUT dataset.
Sri K.
Implement a new strong entity phone in the Sakila database. Attributes and relationships are shown in the following diagram: The phone entity appears on the right. The phone entity contains four attributes, each followed by cardinality information: phone_id 1-1(1), country_code M-1(1), phone_numer M-1(1), and phone_type M-1(0). Three entities appear on the left: store, staff, and customer, connected to the phone entity by three identical relationships. The three relationships are named 'has' and have cardinality 1(0) on both sides. The diagram uses Sakila naming conventions. Follow the Sakila conventions for your table and column names: All lower case Underscore separator between root and suffix Foreign keys have the same name as referenced primary key Write CREATE TABLE and ALTER TABLE statements that: Implement the entity as a new phone table. Implement the has relationships as foreign keys in the Sakila customer, staff, and store tables. Remove the existing phone column from the Sakila address table. Step 2 requires adding a foreign key constraint to an existing table. Ex: ALTER TABLE customer ADD FOREIGN KEY (phone_id) REFERENCES phone(phone_id) ON DELETE SET NULL ON UPDATE CASCADE; Specify data types as follows: phone_id, phone_number, and country_code have data type INT. phone_type has date type VARCHAR(12) and contains strings like 'Home', 'Mobile', and 'Other'. Apply these constraints: NOT NULL constraints correspond to cardinalities on the diagram above. Foreign key actions are SET NULL for delete rules and CASCADE for update rules. Specify a suitable column as the phone table primary key.
Supreeta N.
A corporation that operates five suppliers of athletic apparel in a region provides merchandise for a shoe company. The shoe company recently sought information from the five plants. One variable for which data were collected was the total money (in dollars) the company spent on medical support for its employees in the first three months of the year. Data on the number of employees at the plants are also shown below. Complete parts a and b. Data: Medical Employees $7,773 125 $14,808 404 $12,392 253 $6,708 105 $3,532 70 a. Compute the weighted mean medical payments for these five plants using the numbers of employees as the weights. The weighted mean is (Round to the nearest dollar as needed.) b. Explain why the shoe company would desire that a weighted average be computed in this situation rather than a simple numeric average. Choose one: A. The weighted average takes into account the variation in the data instead of only providing a measure of central tendency. B. The weighted average takes into account the numbers of employees and finds the average payment per employee instead of the average payment per plant. C. The weighted average takes into account the numbers of employees and is a more reasonable measure of the average payments than would be an unweighted average. D. The weighted average takes into account both the mean and the median of the data, instead of only providing the simpler measure of only the mean. Suppose there is an investigation to determine whether the increased availability of generic drugs, Internet drug purchases, and cost controls have reduced out-of-pocket drug expenses. As a part of the investigation, a random sample of 196 privately insured adults with incomes above 200% of the poverty level was taken, and their 2015 out-of-pocket medical expenses for prescription drugs were collected, with the accompanying results. Complete parts a through d below. Data: Out-of-pocket drug expenses: 194.41 136.96 162.24 176.32 200.17 119.67 143.12 207.93 203.87 133.41 130.58 210.51 190.33 122.18 136.56 156.45 157.67 159.04 164.71 208.16 168.37 212.32 107.39 133.32 159.02 192.13 182.53 214.17 174.39 178.02 128.79 189.64 176.45 183.48 202.75 200.58 130.76 146.03 158.67 167.53 165.36 187.54 157.71 164.54 188.46 167.79 156.16 165.08 107.41 147.31 196.23 195.64 148.38 91.23 177.58 176.62 183.72 112.44 168.95 199.48 195.76 211.33 182.66 157.94 207.39 174.48 168.66 163.37 140.25 177.92 175.43 160.58 176.22 164.44 182.13 187.58 150.24 153.33 166.99 186.74 154.48 167.52 174.61 196.28 168.19 214.84 173.71 177.07 130.51 153.72 164.03 95.74 142.49 146.62 139.51 146.15 127.06 170.59 128.97 147.54 183.87 177.13 241.82 202.58 195.15 199.04 206.04 170.04 140.18 205.94 130.19 176.93 184.91 184.88 79.59 177.91 225.58 157.68 141.13 159.35 165.54 194.64 166.51 96.99 173.94 152.84 182.29 220.51 169.72 110.62 113.24 154.11 174.16 166.29 187.12 188.31 155.55 154.63 121.82 158.55 222.46 166.56 170.06 175.02 177.94 182.64 182.44 147.89 147.78 205.43 152.77 160.53 161.71 203.91 161.16 113.97 153.52 189.55 134.75 141.89 175.57 180.14 168.85 153.63 184.32 218.86 172.28 168.43 199.88 175.48 177.67 132.45 125.91 163.79 107.55 174.03 157.84 178.81 196.84 184.04 144.13 150.19 134.11 209.53 173.05 160.83 115.11 168.77 167.14 173.99 181.75 139.87 163.56 206.95 202.45 201.77 a. Calculate the mean and median for the sample data. The mean is (Type an integer or decimal rounded to the nearest cent as needed.) The median is (Type an integer or decimal rounded to the nearest cent as needed.) b. Calculate the range, variance, standard deviation, and interquartile range for the sample data. The range is (Type an integer or decimal rounded to the nearest cent as needed.) The variance is (Type an integer or decimal rounded to two decimal places as needed.) The standard deviation is (Type an integer or decimal rounded to the nearest cent as needed.) The interquartile range is (Type an integer or decimal rounded to the nearest cent as needed.) d. Write a short report that describes out-of-pocket drug expenses for privately insured adults whose incomes are greater than 200% of the poverty level. Choose the correct answer below. A. Out-of-pocket drug expenses are well described by the mean and the standard deviation as there are no outliers. B. Most adults' out-of-pocket drug expenses are close to the median, but there is at least one outlier that creates a large range. C. Out-of-pocket drug expenses are well described by the mean and the standard deviation as the distribution of data is not roughly symmetrical. D. Nearly all adults' out-of-pocket drug expenses are within the interquartile range.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD