Order ready-to-submit essays. No Plagiarism Guarantee!
Note: All our papers are written from scratch by human writers to ensure authenticity and originality.
ECET 370 Week 4 ilab The Efficiency of Algorithms and Sorting
iLAB OVERVIEW
Scenario and Summary
Check your essay before you submit. See exactly what your professor sees.
See your AI and plagiarism results before your instructor does.Get the exact same report your professor uses. Trusted by 50,000+ students worldwide.
The purpose of the lab exercises is to help the student acquire skills in developing programs that involve algorithm analysis, recursion, and sorting.
Deliverables
There are four exercises in this lab, although not all of them will be required for submission. Be sure to read the following instructions carefully.
Exercise 1: No submission is required.
Note that some of the exercises require sections of code to be timed. To learn how to time a section of your source code, please refer to the beginning of the Projects section in Chapter 4 of our textbook.
Exercises 2 and 4 require not only software development but also explanations about the results of the experiments that are conducted. Create separate Word documents to provide the details required in these exercises.
Create a folder and name it Week 4 Lab. Inside this folder, create the subfolders Ex2, Ex3, and Ex4. Place the solution to each of the three exercises required for submission in the corresponding subfolder. Compress the folder Week 4 Lab using a program like WinZip, and place the resulting zipped folder into the Dropbox.
Note that Exercises 2, 3, and 4 require software development. Place in the corresponding folders only .java files. Do not submit the .class files or other files or folders that are generated by the IDE.
Required Software
Eclipse
Access the software at https://lab.devry.edu .
iLAB STEPS
Exercise 1: Review of the Lecture Contents
Back to Top
Create three projects, minimum, factorial, and sorting algorithms, using the classes in
Minimum
Factorial
Sorting Algorithms
Compile them, run them, and review the code that is given carefully. These programs test the code discussed in the lecture.
Exercise 2: Efficiency of Algorithms
Back to Top
Problem 3 in the Projects section at the end of Chapter 4 in the textbook: Find a value of n for which Loop B is faster.
For which value(s) of n was Loop B faster? What have you observed in running this experiment? Any conclusions? Your observations should be entered in a separate Word document.
Note: This exercise requires timing code. You can find how to time a section of code in Java at the beginning of the Projects section in Chapter 4 of the textbook.
Exercise 3: Recursion
Back to Top
Problem 5 in the Exercises section at the end of Chapter 7 in the textbook: Write a recursive method that writes a given array backward. Consider the last element of the array first.
Exercise 4: Sorting
Back to Top
In this week’s lecture, the algorithms quicksort and bubblesort are described. In Sorting Algorithms you can find the class ArrayList, where these sorting algorithms are implemented. Write a program that times both of them for various list lengths, filling the array lists with random numbers. Use at least 10 different list lengths, and be sure to include both small values and large values for the list lengths. Create a table to record the times.
List Length
Bubblesort Time (milliseconds)
Quicksort Time (milliseconds)
Regarding the efficiency of both sorting methods, what conclusion can be reached from this experiment? Both the table and your conclusions should be included in a separate Word document.
Related Tutorials


