CEIS295 Lab 4: All exercises – Header and cpp files included for all exercises with screenshots – Perfect Solution – Instant Delivery

Lab Price = $14
Please feel free to send us your queries at: [email protected]
Payment methods

Add to Cart

Buy Now

View Cart


Problem Statement

Lab Overview
Scenario/Summary
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.
• Exercise 4 requires not only software development but also explanations about the results of the experiments that are conducted.
• Create a separate Word document to provide the details required in the exercise.
• 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, and submit the resulting zipped folder.
• Note that Exercises 2, 3, and 4 require software development. For each of them, place in the corresponding folder the source code files (i.e., .h and .cpp files) you created, and a screenshot of the execution window. Do not submit other files or folders, including those automatically generated by the IDE.
Required Software
Visual Studio
Access the software at https://lab.devry.edu (Links to an external site.)Links to an external site..
All steps
Microsoft Office: Word
Use a personal copy or access the software at https://lab.devry.edu (Links to an external site.)Links to an external site..
Step: 4
Lab Steps
Exercise 1: Lesson Review
Create three projects, Minimum, Factorial, and Sorting Algorithms, using the programs as follows.
• Minimum (Links to an external site.)Links to an external site.
• Factorial (Links to an external site.)Links to an external site.
• Sorting Algorithms (Links to an external site.)Links to an external site.
Compile the three projects, run them, and review the code that is given carefully. These programs test the code discussed in the lesson.
Exercise 2: Designing and Implementing Algorithms
Design and implement an algorithm that, when given a collection of integers in an unsorted array, determines the third smallest number (or third minimum). For example, if the array consists of the values 21, 3, 25, 1, 12, and 6 the algorithm should report the value 6, because it is the third smallest number in the array. Do not sort the array.
To implement your algorithm, write a function thirdSmallest that receives an array as a parameter and returns the third-smallest number. To test your function, write a program that populates an array with random numbers and then calls your function.
Exercise 3: Recursion
The following problem is a variation of Exercise C-4.27 in the Exercises section of Chapter 4 in our textbook.
Implement a recursive function for computing the n-th Harmonic number:
Hn=∑ni=11i/Hn=∑i=1n1i
.
Here you have some examples of harmonic numbers.
H1 = 1
H2 = 1 + 1/2 = 1.5
H3 = 1 + 1/2 + 1/3 = 1.8333
H4 = 1 + 1/2 + 1/3 + 1/4 = 2.0833
Exercise 4: Sorting
In this week’s lesson, the algorithms quicksort and bubblesort are described. In Sorting Algorithms (Links to an external site.)Links to an external site. 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 (it might be convenient to add a parameterized constructor to the class ArrayList so the size of the list can be set at the moment an ArrayList object is declared).
Create a table to record the times as follows.
List Length Bubblesort Time
(seconds) Quicksort Time
(seconds)

Regarding the efficiency of both sorting methods, what are your conclusions? In addition to the source code and a screenshot of the execution window, please submit a separate document with the table and your conclusions about the experiment.

Note: To time a section of your source code, you can do this.
#include

using namespace std;

int main()
{
start = chrono::steady_clock::now();
//add code to time here
end = chrono::steady_clock::now();
chrono::duration timeElapsed = chrono::duration_cast>(end-start);
cout << "Code duration: " << timeElapsed.count() << " seconds" << endl; }

Relevant Material
Screenshots
Lab 4: Ex 4
Lab 4: Ex 4
Lab 4: Ex 3
Lab 4: Ex 3
Lab 4: Ex 2
Lab 4: Ex 2
Instructions
* If you want to purchase multiple products then click on “Buy Now” button which will give you ADD TO CART option.Please note that the payment is done through PayPal.
* You can also use 2CO option if you want to purchase through Credit Cards/Paypal but make sure you put the correct billing information otherwise you wont be able to receive any download link.
* Your paypal has to be pre-loaded in order to complete the purchase or otherwise please discuss it with us at [email protected].
* As soon as the payment is received, download link of the solution will automatically be sent to the address used in selected payment method.
* Please check your junk mails as the download link email might go there and please be patient for the download link email. Sometimes, due to server congestion, you may receive download link with a delay.
* All the contents are compressed in one zip folder.
* In case if you get stuck at any point during the payment process, please immediately contact us at [email protected] and we will fix it with you.
* We try our best to reach back to you on immediate basis. However, please wait for atleast 8 hours for a response from our side. Afterall, we are humans.
* Comments/Feedbacks are truely welcomed and there might be some incentives for you for the next lab/quiz/assignment.
* In case of any query, please donot hesitate to contact us at [email protected].
* MOST IMPORTANT Please use the tutorials as a guide and they need NOT to be used for any submission. Just take help from the material.
******************************************** Good Luck ***************************************************
Privacy Policy
We take your privacy seriously and will take all measures to protect your personal information.
Any personal information received will only be used to fill your order. We will not sell or redistribute your information to anyone.
Refund Policy
Incase you face any issues with the tutorial, please free to contact us on [email protected]
We will try our best to resolve the issue and if still persists we can discuss for a refund in case its required.
Payment Details
Lab Price = $14
Please feel free to send us your queries at: [email protected]

Payment methods

Add to Cart

Buy Now

View Cart

Leave a Reply