Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Programming Language Expert

Write a /bash/bin program to perform a search of an employee list. The file emplist has the format given in the table below and contains information about an upcoming paintball game.

Columns

Data field

01 - 11

Department

12 - 26

Player name

27-39

Team Name

40- 54

Target

55-58

Status (full-time, retired, etc.)

Example of the " emplist " file... (The first two lines represent columns numbers, not in file)

0        1         2         3         4         5         6         7
1234567890123456789012345678901234567890123456789012345678901234567890
Marketing  Ken Whillans   Eagles       Karen Thompson FULL
President  Sandeep Jain   Wimps        Ken Whillans   CONT
...
etc...
Program Requirements
  • Continually prompt the user to enter a player's name or portion thereof (should not have to re-run program for each search).  Use "ZZZ" to exit program.
  • Ask the user if s/he wishes to see the corresponding target (T/t) or team name (M/m); reject any other input with an error message ("Please enter only T or M.") and re-prompt user.
  • Search only the player field of the data file displaying the all occurrences of matching player(s) and corresponding target or team name.
  • E.g. A search for the target of "Ken", should not display any information about "Sandeep". i.e. the search must be restricted to the information in the player column.
  • Use the sample data file from the course website.
  • If no player is found, your program should output a short message to the effect "No such player."
  • If you create any temporary files, they must be cleaned up by your program before it terminates.

Sample execution (not exhaustive testing):

$ search
Player name? ohn
See target (T/t) or team name (M/m)? j
Please enter only T or M.
See target (T/t) or team name (M/m)? t
John Thompson Cher
John Jacobs   Davinder Singh
Dean Johnson  Sandeep Jain
Player name?..

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M9717298

Have any Question?


Related Questions in Programming Language

Assignment - proposal literature review research method1

Assignment - Proposal, Literature Review, Research Method 1. Abstract - Summary of the knowledge gap: problems of the existing research - Aim of the research, summary of what this project is to achieve - Summary of the a ...

Php amp session managment assignment -this assignment looks

PHP & SESSION MANAGMENT ASSIGNMENT - This assignment looks at using PHP for creating cookies and session management. Class Exercise - Web Project: Member Registration/Login This exercise will cover adding data connectivi ...

Assignmentquestion onegiving the following code snippet

Assignment Question One Giving the following code snippet. What kind of errors you will get and how can you correct it. A. public class HelloJava { public static void main(String args[]) { int x=10; int y=2; System.out.p ...

Structs and enumsoverviewin this task you will create a

Structs and Enums Overview In this task you will create a knight database to help Camelot keep track of all of their knights. Instructions Lets get started. 1. What the topic 5 videos, these will guide you through buildi ...

Assignment - horse race meetingthe assignment will assess

Assignment - Horse Race Meeting The Assignment will assess competencies for ICTPRG524 Develop high level object-oriented class specifications. Summary The assignment is to design the classes that are necessary for the ad ...

Task silly name testeroverviewcontrol flow allows us to

Task: Silly Name Tester Overview Control flow allows us to alter the order in which our programs execute. Building on our knowledge of variables, we can now use control flow to create programs that perform more than just ...

Question 1 what is a computer program what is structured

Question: 1. What is a Computer program? What is structured programming? 2. What is modular programming? Why we use it? 3. Please evaluate Sin (x) by infinite series. Then write an algorithm to implement it with up to th ...

Background informationthis assignment tests your

Background Information This assignment tests your understanding of and ability to apply the programming concepts we have covered throughout the unit. The concepts covered in the second half of the unit build upon the fun ...

1 write a function named check that has three parameters

1. Write a function named check () that has three parameters. The first parameter should accept an integer number, andthe second and third parameters should accept a double-precision number. The function body should just ...

Task arrays and structsoverviewin this task you will

Task: Arrays and Structs Overview In this task you will continue to work on the knight database to help Camelot keep track of all of their knights. We can now add a kingdom struct to help work with and manage all of the ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As