Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help me complete this assignment: In this assignment, you will write a bash script called tsp which will classify a triangle. It will lake,

please help me complete this assignment:

image text in transcribed

In this assignment, you will write a bash script called tsp which will classify a triangle. It will lake, as command-line arguments, the lengths of the three sides of a triangle, and classify the triangle as exactly one of. Right A 90 degree angle, per the Pythagorean Theorem: a^2 + b^2 = c^2. Equilateral: All three sides are the same length Isosceles: Two sides, but not three, are the same length. Scalene: No sides are the same length. Not a triangle: For example, lengths of 1, 2, and 9. They just don't fit together! Testing Here are some of the ways that we will test your program. You can try your program with these arguments, and fix any problems you may have, or you can wait and let us find your problems. Your grade will reflect your choice. Here are some bad inputs, which must generate only an error message. Requirements Your program should emit a helpful error message if too many or too few arguments are given any argument is not an integer (a whole number) greaterthanorequalto 1 I haven't told you precisely what the output should look like, and I haven't told you precisely what a helpful error message would be. Figuring that out is part of the assignment. If your program emits an error message, it should not emit anything else. For example, given the arguments it would be wrong for the program to complain about the arguments not being greaterthanorequalto 1, and then go on to declare this an equilateral triangle In cases where multiple requirements are violated, say for the two arguments Fish theta, it doesn't matter which requirement you complain about. Pick one, complain, and that should be all This must be a pure bash script, and not use any other languages such as perl awk. You may use programs such as sed or Don't be concerned about leading zeroes in numbers. They are used by bash to indicate octal (base 8). We will not test your program with leading zeroes The first line of your script must be 1 bin/bash Your script must include a comment block after the first line that contains: your name, course, assignment, and date

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

Step: 3

blur-text-image

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

Spatio Temporal Database Management International Workshop Stdbm 99 Edinburgh Scotland September 10 11 1999 Proceedings Lncs 1678

Authors: Michael H. Bohlen ,Christian S. Jensen ,Michel O. Scholl

1999th Edition

3540664017, 978-3540664017

More Books

Students also viewed these Databases questions

Question

State the uses of job description.

Answered: 1 week ago

Question

Explain in detail the different methods of performance appraisal .

Answered: 1 week ago

Question

=+ What topics are contained in the contracts?

Answered: 1 week ago