Recursive algorithms through appropriate application

Assignment Help Software Engineering
Reference no: EM133184588

ADS103 Algorithms and Data Structures - Laureate International Universities

Programming Assignment

Learning Outcome 1: Identify and utilise appropriate algorithms to solve software engineering problems.

Learning Outcome 2: Identify and utilise appropriate data structures to solve software engineering problems.

Learning Outcome 3: Design and develop functions and classes to manage levels of code complexity.

Learning Outcome 4: Demonstrate an understanding of recursive algorithms through appropriate application.

Learning Outcome 5: Demonstrate the ability to read and interpret moderately complex code, describe its purpose, and systematically debug for issues in syntax or logic.

Assessment Task

Implement the sorting algorithm and C++ Standard Library tasks below to demonstrate your understanding of the development and utilisation of important algorithms and data structures.

Please refer to the Instructions for details on how to complete each task.

Context

The two tasks below seek to examine your conceptual and practical understanding of some key algorithms and data structures.

Task 1 focuses on comparing the performance of sorting algorithms against each other, and the
impact of the data's ordering on performance. You likely won't need to implement many searching algorithms in the industry but crafting them yourself will give you firsthand practical experience at seeing which types of algorithms perform better under different types of conditions. As a software

engineer, you will need to create algorithms here and there to solve unforeseen problems; therefore, familiarity with multiple approaches will help.

Task 2 focuses on utilising pre-built data structures from the C++ Standard Library to store and retrieve sets of data. In any given coding language, there are likely to be existing container structures. You will practise with some common ones used in C++, but the use of these containers is similar in approach in most languages.

Instructions

Task 1
You will write a program to retrieve a data set from a text file at a time and measure the time taken to sort it with two different sorting algorithms. You can choose which sorting algorithms to write from the provided options.

Provided are two text files, a2_task1_input1.txt and a2_task1_input2.txt. They are formatted similar to the below example but with much more data:

Line 1 of the input file is the number of data elements to sort. Line 2 is the data elements to be sorted.
Your Learning Facilitator may test with their own supplied input file reading any number of data elements; therefore, ensure your code can be flexible. a2_task1_input1.txt contains completely random numbers; a2_task1_input2.txt contains sorted data with only the first number out of sequence.

Open a2_task1_input1.txt for reading (using, say, std::ifstream).
Using the count value in line one of the file, read the number from line 2 into either a dynamically allocated array or std::vector.
Write either an insertion or bubble sort algorithm and sort the data.
Measure the time taken to complete the sort (in milliseconds).
Read the file contents once again into another dynamically allocated array or vector. You're going to be sorting this fresh copy of the original file data-you don't want to inadvertently sort the already-sorted vector from step 1.3.
This time, write a quick sort or merge sort algorithm and measure how long it takes to sort the data (in milliseconds).
Compare the times taken for the two sort operations and output. Which algorithm was the quickest sorting this particular data set to the screen?

Repeat the above steps with a2_task1_input2.txt, this time to compare how the two algorithms compete on a mostly sorted set of data.

Task 2
This task requires you to implement a simple book management system utilising the C++ Standard Library.

Step 1
Write a menu screen that presents the user with these options:

What would you like to do:

1) List all books you have on loan
2) Return a book
3) List all books in the library
4) Borrow a book
5) Exit

Enter choice (1-5):

If the user enters a number from 1-4, the program moves on to that functionality. After it's complete (say, listing books on loan, or a user completes borrowing a book), the program should loop back to the main menu.

Step 2
Include std::vector and std::map libraries into the project. Create a map of books for the library with int as the key and string as value pair. Store at least 10 books, e.g.
books.insert(pair<int, string>(5, "Moby Dick"));
Create a vector of ints to store book IDs of borrowed books.

Step 3
Implement the menu actions as follows
1) List all books you have on loan: Output all the borrowed book IDs currently in your vector alongside book name, which will need to retrieved from the books map. Here's an example:

5: Moby Dick

22: The Wizard of Oz

2: Charlie and the Chocolate Factory etc.
2) Return a book: User is asked to input the ID of the book to return and if it exists in the vector, remove that book from the book's borrowed vector

3) List all books in the library: Output all IDs and book titles in the books map, e.g. 5: Moby Dick

22: The Wizard of Oz 9: Three Musketeers etc.
4) Borrow a book: User is asked which book ID to borrow from the library. If it exists, add the
title to the user's books borrowed vector

5) Exit: quits the program

Step 4

Add in any relevant functions or classes to maintain the project.

Referencing
It is essential that you use appropriate APA style for citing and referencing research.

Attachment:- Algorithms and Data Structures.rar

Reference no: EM133184588

Questions Cloud

Summary of the regulated competition model : Apply your critical review to the country chosen by your colleague and provide an accurate description of the level of fulfilment of the 10 pre-conditions
Explain in details whether bic ltd is a subsidiary of alice : Alice Ltd owns 40% of the shares of Bic Ltd. Another 25% of the shares of Bic is owned by Can Ltd. Explain in details whether Bic Ltd is a subsidiary of Alice
Classify allison as an excepted or prescribed person : Interest from Allison other bank account in which she banked her receipts for her employment activities $240. Classify Allison as excepted or prescribed person
Calculate the net capital gain : He sold the property on 14 june 2020 for $1.7m. Calculate the net capital gain, if any, on the disposal of the investment property for the 2019/20 income year
Recursive algorithms through appropriate application : Implement the sorting algorithm and C++ Standard Library tasks below to demonstrate your understanding of the development and utilisation of important algorithm
What is the management primary goal : What is the management's primary goal? Is maximizing shareholder value inconsistent with being socially responsible? Explain
Calculate the equivalent units of production-conversion cost : BTS Products Company uses an automated process to manufacture its pet replica products. Calculate the Equivalent Units of Production - Conversion Cost
What is meant by stock split effected in form of a dividend : What is meant by stock split effected in form of a dividend. How should a stock dividend that has been declared but not yet issued be classified
Pass general entries of the transactions : Purchased a building for Rs.15,000,000 against the issuance of 1,100,000 shares of Rs.10 each. Pass general entries of the above transactions

Reviews

Write a Review

Software Engineering Questions & Answers

  Research report on software design

Write a Research Report on software design and answer diffrent type of questions related to design. Report contain diffrent basic questions related to software design.

  A case study in c to java conversion and extensibility

A Case Study in C to Java Conversion and Extensibility

  Create a structural model

Structural modeling is a different view of the same system that you analyzed from a functional perspective. This model shows how data is organized within the system.

  Write an report on a significant software security

Write an report on a significant software security

  Development of a small software system

Analysis, design and development of a small software system.

  Systems analysis and design requirements

Systems Analysis and Design requirements

  Create a complete limited entry decision table

Create a complete limited entry decision table

  Explain flow boundaries map

Explain flow boundaries map the dfd into a software architecture using transform mapping.

  Frame diagrams

Prepare a frame diagram for the software systems.

  Identified systems and elements of the sap system

Identify computing devices, which could be used to support Your Improved Process

  Design a wireframe prototype

Design a wireframe prototype to meet the needs of the personas and requirements.

  Explain the characteristics of visual studio 2005

Explain the characteristics of Visual Studio 2005.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd