Java代写:CS3060 Io Day

代写Java作业,实现题目要求的算法,以及一些工具类。

Instructions

Complete the tasks below using the current programming language. Your code must consist of a single, driver file that calls the functions that you write for each solution. You may create any additional number of files, classes, functions, etc. but all functions must be called from that file to demonstrate all work that you have completed.

Grading Rubric

90 points total. Each question in the assignment will be evaluated according to the rubric below.
The number of points are listed in a percentage format where the percent will be multiples by the total points possible for each question. For instance, if you score a “Generally Correct” on a 5 point question, you will receive
3 points (60%) while the same result on a 10 or 15 point question will result in 6 or 9 points, respectively.

  • Is your repository named correctly?
    • (100%) Perfect in all aspects
    • (80%) Mostly perfect. Some minor errors or styling issues
    • (60%) Generally correct, but some significant errors and/or styling issues
    • (40%) Almost correct, significant issues preset
    • (20%) Effort made, but incorrect and poorly styled
    • (0%) No submission or effort evident

Function #1

Write a function that prints the string “Hello, world.”

Function #2

Write a function that accepts 2 parameters: A string and a substring to find in that string. The function should find the index of substring in string and print that index.

Function #3

Write a function that accepts a single parameter - A list/array - and performs 3 actions: 1) Sort the array and print the values, 2) Sort the array in reverse order and print the values, and 3) Prints the value of each array/list item that has a ODD index. The array passed into this function must contain at least 100 randomly generated values.

Function #4

Generate a list/array of 100 random values. Sort the list using a Selection Sort (See Wikipedia for description of Selection Sort). The selection sort must be implemented by you in the current language.

Function #5

Implement a function to calculate the Fibonacci series recursively. Calculate all Fibonacci numbers from 1 to 500. The Fibonacci Series is defined below with F1 = F2 = 1 and F0 = 0.

Fn = Fn-1 + Fn-2

Function #6

Implement a function to calculate the Fibonacci Series iteratively. Calculate all Fibonacci numbers from 1 to 500. Compare the computation time and lines of code with Function #5.

Function #7

Implement a function to perform matrix multiplication. The function should take two parameters - Matrix A and Matrix B - and return the resultant matrix - Matrix C. Test by generating a variety of random matrices that are filled with random decimal values between 0 and 100. You should test your code with matrix sizes of 50x50, 100x100, 500x500, and 1000x1000.

Function #8

The Hamming distance between two numbers is the number of bits that must be changed to make the bit representations of the two numbers equal. For instance, the number 79 is represented as 1001111 in binary, the number 83 is represented as 1010011 in binary, and the Hamming distance between them is 3, as the second, third and fourth bits (counting from the right, starting with zero) differ.

Write a function that accepts one parameter - a filename. This file will contain two strings on each line, with each string being seperated by a “ “. Your function should read each line, calculate the Hamming distance between the two values, and then write the line back to a new file in the format “Value1:Value2:HammingDistance”. It is up to you to generate a test file for this function. The output file should insert the string “_Output” into the original filename. If the input file is “HammingData.csv” then the output file would be “HammingData_Output.csv”.

Function #9

Create a csvReader class that is capable of opening, reading, and accessing the data from any given CSV file. The csvReader class should use a csVRow object to store the data from each row in the CSV file. This function should contain code that demonstrates the ability of your class to read, iterate, and display the contents of a CSV file. If a header is present, it should be printed. All output should be aligned and well formatted.

Function #10

Implement the equivalent of the Class diagram shown in the image below. This function should contain test code that demonstrates that you have fully implemented these structures and that the inheritance demonstrated works flawlessly.

README.md

Include a file named README.md that includes instructions for compiling and running all the solutions to all of your exercises. It would be appreciated if this file includes the exact commands used to compile and run your code as well as examples of the output produced by your solutions. As this is a markdown (.md) file, you may use markdown to style your instructions, though this is not required.