BEST代写-最专业、靠谱的代写

Best代写-最专业、靠谱的代写IT&CS | 留学生作业 |编程代写 | Java | Python | C/C++ | PHP | Matlab | Assignment Project Homework代写

Perl代写 | USP 32547 IT 32547 Assignment

Perl代写 | USP 32547 IT 32547 Assignment

Assignment

Description

This assignment is an individual programming assignment using Perl. It addresses objectives 2 and 3 as listed in the Subject Outline document.

No limits apply to the number of lines of code of the program.

Assignments are to be completed individually (this might be checked with the use of anti- plagiarism tools such as Turnitin). You should not receive help in the preparation of this assignment, nor ask anyone else to prepare it on your behalf in any way.

 

Marks

The assignment corresponds to 30% of the total marks.

 

Submission

The completed assignment is due by 5:00pm of Friday 7 June 2019.

 

PLEASE PAY CAREFUL ATTENTION TO THE FOLLOWING SUBMISSION INSTRUCTIONS:

 

  1. The assignment has to be submitted electronically as a single ZIPPED file attached to an email to the Subject Co-ordinator, Massimo Piccardi ([email protected]).
  2. The email’s subject must be: 32547 – assignment submission – <yourStudentID>. Example: 32547 – assignment submission – 99887799.

Email without this subject or with a different subject may not be accepted as a valid submission. Submit the email from your UTS email account, otherwise the submission may get blocked or not be received.

  1. The filename for the zipped archive attached to the email must be:

USP_<yourSurname>_<yourStudentID>.zip.

Example: USP_Piccardi_99887799.zip. Archives with a different filename may not be accepted as a valid submission.

  1. Late assignments will be deducted one mark per day late, more than seven days late the assignment will receive zero. Special consideration, for late submission, must be arranged in advance with the Subject Co-ordinator.
  2. If you would like a receipt, just please add a request for a Return Receipt to your email. No other types of receipts can be

If you do not follow the instructions above, your file may not be received or tracked correctly and thus may not be marked.

 

Academic Standards

The assignments in this Subject should be your own original work. Any code taken from a textbook, journal, the Internet or any other source should be acknowledged. For referencing, please use the standard referencing conventions (http://www.lib.uts.edu.au/help/referencing).

 

Marking Scheme

 

Mark Range 
30All requirements of the assignment are met. The submitted program can be executed by the lecturer “as is” and produces the requested output.
24-29The program works correctly with any valid file and for all options, but its execution experiences some minor problems.
18-23The program does not work as expected with one of the options.
0-17This range goes from no submission at all (0 marks) to a submission which does not meet major requirements of the assignment.

Examples:

·     the program does not work as expected with two or more options;

·     the program generates unhandled errors;

·     the program does not solve the assignment problem.

 

The assignments will be marked within two weeks from the submission deadline. Important notes:

·     Submission of this assignment is not compulsory to pass the subject; do not feel that you have to submit it “at all costs” and perhaps be tempted to seek unauthorised assistance.

  • There are no minimum requirements on the marks on this assignment to pass the

 

 

Title: Task information with Perl

 

In this assignment, you will write a Perl program that reads from a file similar to the output of Unix’ command top (a file that contains information about the tasks running on the system). Your program will process options and print the requested output to the standard output.

 

These are the specifications for your Perl program:

 

  1. The file containing your program must be named pl

 

  1. It must be invoked as:

displaytasks.pl option task_file

The program must check that the task_file argument is an existing and readable file. If not, it must print a message of your choice to the standard output and exit. The format for file task_file and the values for the option argument are described below.

  1. File task_file can have any arbitrary name. It must be a file of text with the following format:
    1. The file consists of an arbitrary, yet reasonable, number of lines (including, possibly, zero lines). Each line corresponds to a
    2. Each line must contain four fields separated by
    3. The four fields are: process ID, memory size, CPU time and program name.
    4. Field process ID is an integer between 0 and 32768. Fields memory size and CPU time are integers between 0 and 99999999. Field program name is a string between 1 and 20 characters in length containing no

 

The following example should be regarded as the reference specification for the format of file task_file:

 

1 4730 1031782 init

4 0 6 events 2190 450 0 top

21413 5928 1 sshd

22355 1970 2009 find

Important note: your program does not need to verify that file task_file complies with the specifications. You can simply assume that the file meets all the specifications given above.

 

  1. Your program can be invoked with option: -a. In this case, it must print all the lines of file task_file sorted alphabetically by field program name (if two or more lines have the same value of field program name, they can be printed in any arbitrary order; in all cases, we will not test this case).

 

Example with the example task_file given above:

 

Command line:

displaytasks.pl -a task_file

Output:

 

4 0 6 events

22355 1970 2009 find

1 4730 1031782 init

21413 5928 1 sshd

2190 450 0 top

In the case in which file task_file is empty, your program will print:

 

No tasks found

  1. Your program can be invoked with option: -m. In this case, it must print the following string:

 

Total memory size: <total memory size for all tasks in task_file> KB

The total memory size is computed by simply adding up the values of field memory size for all lines.

 

Example with the example task_file given above:

 

Command line:

displaytasks.pl -m task_file

Output:

Total memory size: 13078 KB

In the case in which file task_file is empty, your program will print:

 

No memory used

  1. Your program can be invoked with option: -t. In this case, it must print the following string:

 

Total CPU time: <total CPU time for all tasks in task_file>

seconds

The total CPU time is computed by simply adding up the values of field CPU time for all lines.

Example with the example task_file given above: Command line:

displaytasks.pl -t task_file

 

Output:

Total CPU time: 1033798 seconds

In the case in which file task_file is empty, your program will print:

 

No CPU time used

  1. Your program can be invoked with option: -s memory threshold. In this case, it must print all the lines of file task_file where the value of field memory size is greater than or equal to the value of memory threshold, in appearance order. The format of argument memory threshold is the same as that of field memory size.

 

Example with the example task_file given above:

 

Command line:

displaytasks.pl -s 2000 task_file

Output:

1 4730 1031782 init

21413 5928 1 sshd

In the case in which no values of field memory size meet the requirement (including the case of an empty file), your program must print:

No tasks with the specified memory size

  1. Your program can be invoked with option: -n. In this case, it must only print your name, surname, student ID and date of completion of your assignment, in a format of your choice. Please note that argument task_file is still required.
  2. If your program is invoked with any other syntax than those specified above, it must print a message of your choice to the standard output and

 

Examples of incorrect syntax:

displaytasks.pl -Z task_file

displaytasks.pl -u

  1. Zip your file pl into a file named USP_<yourSurname>_<yourStudentID>.zip and submit it with the modalities specified above. Several free zip utilities are available on the WWW.

 

 

Please be reminded that:

·      this assignment must be your own work and you should not be helped by anyone to prepare it in any way; your assignment may be tested by anti-plagiarism software that detects superficial changes such as changing variable names, swapping lines of code and the like.

 

  • understanding the assignment specifications is part of the assignment itself and no further instructions will be provided; on the other hand, whatever is not constrained you can implement it according to your own best
bestdaixie