Ada Programming Language

  • Job DurationLess than a week
  • Project LevelBasic Level
  • Project deadlineExpired

Project detail

PLEASE DO THIS IN ADA PROGRAMMING LANGUAGE.
Please write the code in Ada Programming language.

General problem description

You will write a program which checks a work assignment against a collection of constraints to see whether the work assignment is acceptable.

In the IT Department of the Magrathean Construction Company, there are four work shifts during the day: 9:00-11:00, 11:00-1:00, 1:00-3:00, and 3:00-5:00. During each shift, four workers are needed: Two to answer customers’ questions on the phone, one to repair computers, and one to fix network problems. No worker can work more than one job or shift during a day. Thus, it takes 16 different workers to fill all the jobs during a day.

The various employees of the company have different skills: some are good at answering phones, some are good at repairing computers, some are good at fixing network problems, and some are good at more than one of these tasks. An employee should only be assigned to a job if he/she has that job skill.

The input to your program will be a proposed job assignment (the phone, computer, and network workers for each of the four shifts), followed by a list of workers and their skills. The workers and their skills will be specified by a worker’s name, then three numbers (1 or 0) indicating whether the person is good at answering phones, repairing computers, and fixing the network, in that order. 1 indicates that the employee has the skill, and 0 indicates that the employee does not have the skill.

The output will be a message indicating whether the proposed job assignment is acceptable.

Write a Ada program to solve the problem described above.

To make the input easier to work with, in this version of the problem, the employees’ names will be represented by single letters: “A”, “B”, etc.

The input will contain 4 lines of 4 letters each, separated by a single space, representing the job assignments. This is followed by a positive integer N on a line by itself, indicating the number of employees. This is followed by N lines of 4 characters each: the employee’s name (a single letter), then three numbers 1 or 0 indicating whether the person is good at answering phones, repairing computers, and fixing the network, in that order; these 4 characters will be separated by a single space.

You are guaranteed that there will be at least one employee and there will be no more than 26 employees.

The output will be one of the two messages “Acceptable” or “Not Acceptable”.

Please stick strictly to the input format, as it will make your program easier to test.

Examples:

Input:

P D K L

B T R F

S N A C

E G M O

17

A 1 1 1

B 1 1 1

C 1 1 1

D 1 1 1

E 1 1 1

F 1 1 1

G 1 1 1

J 1 1 1

K 1 1 1

L 1 1 1

M 1 1 1

N 1 1 1

O 1 1 1

P 1 1 1

R 1 1 1

S 1 1 1

T 1 1 1

Output:

Acceptable

Input:

Y C V L

D E K S

F G M T

N J P Z

20

A 1 0 0

B 0 1 1

C 1 1 1

D 1 0 0

E 1 0 0

F 1 0 1

G 1 0 1

J 1 1 1

K 0 1 1

L 1 0 1

M 0 1 1

N 1 0 0

P 1 1 1

Q 1 1 0

R 1 0 0

S 0 1 1

T 0 0 1

V 0 1 0

Y 0 1 0

Z 1 1 1

Output:

Not Acceptabl

Industry Categories

Freelancer type required for this project