Lab12_Arrays II_SecurityInjection

docx

School

Towson University *

*We aren’t endorsed by this school

Course

175

Subject

Computer Science

Date

Dec 6, 2023

Type

docx

Pages

5

Uploaded by GrandBraveryDinosaur15

Report
COSC 236 Dr. Alkharouf Lab 12* Arrays: 1) Write a method called arrayAvg that accepts as an argument an array of numbers and returns the average of the numbers in that array. Create an array to test your code with and call the method from main to print the average to the screen. 2) Write a method called arrayMin that accepts as an argument an array of numbers and returns the minimum value of the numbers in that array. Create an array to test your code with and call the method from main to print the min to the screen.
3) Write a method called arrayMax that accepts as an argument an array of numbers and returns the maximum value of the numbers in that array. Create an array to test your code with and call the method from main to print the max to the screen.
4) Write a JAVA program that asks the user for numbers to store in 2 arrays, i.e. first ask the user for 4 numbers and store them in Array 1, then ask for another 4 numbers and store them in Array2. Next determine if the two arrays are the same or not (i.e. contain the exact values at the same positions).
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Security Injections: The point of these exercises is to give you an understanding of secure coding, no matter what your intended major maybe. The CIS department has developed a series of tutorials, which can found here: http://cis1.towson.edu/~cssecinj/ We will be completing the Java tutorials under CS1\Java. See snap shot below:
For today, complete the java tutorial on “Buffer Overflow” . And submit the certificate you get to BB with the source codes for Q1-4. Deliverables: Submit through Black Board: 1- Your solutions (attach the .java files). 2- A word document that contains snapshot of your code and output.