Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I JUST NEED A PICTURE OF WHAT THE PROGRAM DATA SHOULD LOOK LIKE, AN EXAMPLE IS THE PICTURES DOWN BELOW. JUST THE CODE, DONT NEED

I JUST NEED A PICTURE OF WHAT THE PROGRAM DATA SHOULD LOOK LIKE, AN EXAMPLE IS THE PICTURES DOWN BELOW. JUST THE CODE, DONT NEED A PICTURE OF THE OUTPUT OR DOWNLOAD FILE.

1. From the specifications for program 2 on your group Discussion Forum, write your program.

2. After you complete your program, submit it, fix any syntax errors and submit again until it is correct.

This program requires that you do arithmetic.

The goal of program 2 is to provide you with experience in writing a program that contains arithmetic statements and numeric edited fields.

Your specs will include:

  1. Arithmetic as stated in the Discussion Forum
  2. Output fields that contain some sort of editing, like zero suppression, dollar signs, plus or minus signs, commas and/or decimal points.

Program 2 Specifications

Sacred Heart Hospital

Sacred Heart Hospital requires a printed list of recent and upcoming appointments. They also need to know total and average charges.

This list will contain all the fields on the input record separated by 2 or 3 spaces between each field. Print a total line that includes the total number of patients, total charges, total estimated charges, total actual charge, and the average charge. Please read the input file, do the calculations, and print out the list.

Calculate...

  • Total number of patients by adding 1 to a patient counter for each record read
  • Total charges by adding the charge to the charge accumulator
  • If the Charge Type = E add the charge to the estimated charge accumulator
  • If the Charge Type = A add the charge to the actual charge accumulator
  • Average Charge by dividing the charge accumulator by the patient counter

Input file name is KC02764.P1G1.DAT

Length = 66

See actual content below the layout.

Input Layout

Field

Length

Data Type

Comments

Patient ID

5

Alphanumeric

Patient First Name

12

Alphanumeric

Patient Last Name

14

Alphanumeric

Doctor ID

4

Alphanumeric

Appointment Date

8

Numeric

Date (no editing characters on input)

Appointment Time

4

Numeric

First 2 digits are hour, second 2 digits are minutes. (no editing characters on input)

Expected appointment length

3

Numeric

Expressed in minutes (1 hour appt = 60) Use whole numbers only

Last Encounter

8

Numeric

Date (no editing characters on input)

Charge

6

Numeric

2 of the 6 total digits are decimal places

Charge type

1

Alphanumeric

A - Actual

E - Estimated

Note for proper formatting see file on mainframe

HG87 ROBB GRETZKE DRDG02192023063009006112022017000E

MS56 THAD JONES DRDG01122023094506005172022012345A

IV33 MARY ARELLA DRDG12202022110007007092022013589A

OU90 SUSAN CHEN DRDG11242022120010008262022018000E

QT45 BECKA THOMPSON DRDG10232022123003009122022007000E

YG12 ARI WELKS DRDG06212023070012006252021011056A

KJ01 KEVIN JAMESON DRRG03152023083003009102022015000E

SR77 SAMUEL RICHARDS DRRG01222023144504509102022007550A

JE80 JASMINE EVANS DRRG02012023123001509102022008000E

LW06 LARRY WASHINGTON DRRG12142022150003009102022010000A

MJ43 MICHAEL JEFFERSON DRRG11202022093003009102022012500A

FS90 FRANCINE SMITH DRRG02142023114501509102022005000E

AW31 ALFRED WIMBERLY KJ4502132023114503009112022032000A

TS44 TERRI SUTHERLAND GW7611042022120001509122022080090E

MS66 MICHAEL SCOTT KJ4509012022091504509112022060001E

RT06 RUTHIE TANNER KJ4508172022083001009112022040780E

PJ18 PATRICK JENNINGS GW7605292023125006009112022502000A

RH15 RICHARD HUYNH JATG10222022093006007202022002500E

MV23 MEGAN VONG JATG10292022110009008282022006050E

FW42 FRANK WILLIAMS JATG03152023010006010202022012000A

LH44 LEWIS HAMILTON JATG02112023090003001022023002500E

GR63 GEORGE RUSSELL JATG12152022100012009282022006000A

AA23 ALEX ALBON JATG12202022103018010012022012000A

MV01 MAX VERSTAPPEN JATG01252023115518004222022003500E

AG06 AUBREY GRAHAM JATG05052023023001002232023000600E

PROGRAM 2 EXAMPLE TXT (THIS IS WHAT THE ANSWER SHOULD LOOK LIKE, EXCEPT WITH DATA FROM ABOVE)

image text in transcribed

image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Accounting

Authors: Floyd A. Beams, Joseph H. Anthony, Bruce Bettinghaus, Kenneth Smith

13th edition

134472144, 978-0134472140

More Books

Students also viewed these Accounting questions

Question

Would really need a step to step guide for this, thanks!

Answered: 1 week ago