Question
JAVA UNIT TESTING QUESTION: QS. 1. Awk For all awk problems, ensure that you have the proper shebang so that they can be run with
JAVA UNIT TESTING QUESTION: QS. 1. Awk For all awk problems, ensure that you have the proper shebang so that they can be run with only an input file as input, and no flags or options. In a file called col1, write an awk script that will print the first column of a given file with the default separator. In a file called computeExpense.awk, write an awk script that will take a comma separated file where the first column is the users name, the second is their hourly rate, and the third is their hours worked. Calculate the total money spent in salaries. (sum all of column 2 * column 3). An example file is: John Doe,25,20 Megan Jones,15,5 Matt Bomer,80,40 In a file called percentWriteIn, write an awk script that will compute and print the percent of votes where the name field is "Write In" from a file in the format of a .txt file. Python In a file called loop, write a python program that computes and prints the sum of numbers from 1 to 10. In a file called fun, write a python function that takes a parameter n. The function then recursively computes the sum of numbers from 1 to n and returns that value. Print the return value of calling that function with an n of your choice. Do not use user input, just pick a value. In a file called computeExpense.py, use the sys package to read in a file name as the first program argument. Open that file and perform the same calculation as in the computeExpense.awk problem. In a file called martiniGlass, use the sys package to read in a single parameter. Print out a martini glass as seen in the attached image, martiniGlass.jpg (bbLearn has terrible support for monospaced font). The program should accept any positive number as input and print the appropriately scaled glass... cause some days, you need the large glass. Validate that the parameter was appropriate (greater than 0).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started