Welcome to Assignments Writing

Your Trusted Partner in Term Paper Writing

At Assignments Writing, we’re a team of passionate educators and skilled writers committed to supporting students in their academic journey.

SNHU CS Analysis and Design Vector Sorting Questions

SNHU CS Analysis and Design Vector Sorting Questions

ANSWER

  1. Project Setup:
    • Create a new C++ project named “VectorSorting” with the specified settings.
    • Download the starter program files and replace the auto-generated ones in the /src directory.
    • Ensure you have the -std=c++11 compiler switch in the miscellaneous settings if needed.
  2. Task 1: Implement Selection Sort Algorithm:
    • Code the selection sort logic using “bid.title” as the sorting field.
    • You should complete the void selectionSort(vector<Bid>& bids) method in the VectorSorting.cpp file.
    • In the main() method, invoke the selectionSort() function and collect/report timing results.
  3. Task 2: Implement Quicksort Algorithm:
    • Code the quicksort logic using “bid.title” as the sorting field.
    • Implement the void quickSort(vector<Bid>& bids, int begin, int end) method and the int partition(vector<Bid>& bids, int begin, int end) method in the VectorSorting.cpp file.
    • In the main() method, invoke the quickSort() function and collect/report timing results.
  4. Code Reflection:
    • Write a brief explanation of your code’s purpose and a discussion of your experience in developing it.
    • Mention any challenges you faced during development and how you resolved them.
  5. Pseudocode or Flowchart:
    • Create pseudocode or a flowchart that describes the logic of your code. Make sure it’s clear and understandable.
  6. Specifications and Correctness:
    • Ensure your code meets the specified requirements and produces the expected output.
    • Even if your code doesn’t produce the correct output, make sure it’s free of errors and follows good coding practices.
  7. Annotation/Documentation:
    • Comment your code thoroughly to explain its purpose and approach.
    • Document any sections of code that might be producing errors or incorrect results.
  8. Modular and Reusable Code:
    • Keep your code modular and reusable by adhering to the single responsibility principle. Each method should have a clear purpose and do one job.
  9. Readability:
    • Make sure your code is well-organized with consistent formatting, variable naming, and indentation.
    • Use explicit and meaningful variable names.
  10. Submission:
    • Submit the CPP code files for your project.
    • Include the code reflection and associated pseudocode or flowchart (1-2 paragraphs in length).

This assignment will help you practice sorting algorithms, code organization, and documentation. Ensure that your code is clean, efficient, and well-documented to receive a good grade. If you encounter any specific issues while working on the project, feel free to ask for help or clarification.

SNHU CS Analysis and Design Vector Sorting Questions

QUESTION

Description

CS 300 Module Two Assignment Guidelines and Rubric

Overview

The focus of these problems will be working with information extracted from a municipal government data feed containing bids submitted for auction of property. All materials for this assignment can be found in the Supporting Materials section below. The data set is provided in two comma-separated files:

  1. eBid_Monthly_Sales.csv (larger set of 12,023 bids)
  2. eBid_Monthly_Sales_Dec_2016.csv (smaller set of 76 bids)

This assignment is designed to explore sorting algorithms by implementing both a selection sort and quicksort of a vector of bids loaded from a CSV file.

We provide a starter console program that uses a menu to enable testing of the sort logic you will complete. It also allows you to pass in the path to the bids CSV file to be loaded, enabling you to try both files. In this version, the following menu is presented when the program is run:

Menu:

    1. Load Bids
    2. Display All Bids
    3. Selection Sort All Bids
    4. QuickSort All Bids
    1. Exit

Enter choice:

The VectorSorting.cpp program is partially completed. It contains empty methods representing the programming interface used to interact with the linked list. You will need to add logic to the methods to implement the necessary behavior. Here are the methods in VectorSorting.cpp that you must complete:

void selectionSort(vector& bids)

void quickSort(vector& bids, int begin, int end)
int partition(vector& bids, int begin, int end)

Prompt

You will need to perform the following steps to complete this activity:

Setup: Begin by creating a new C++ project with a project type of “Hello World C++ Project”.

  1. Name the project “VectorSorting”. Remember to pick the correct compiler in Toolchains and click Finish. This will create a simple VectorSorting.cpp source file under the /src directory.
  2. Download the starter program files and copy them to the project’s /src directory, replacing the existing auto-generated ones. Remember to right-click on the project in the Project Explorer pane on the left and Refresh the project so it adds all the new files to the src folder underneath.
  3. Because this activity uses C++ 11 features, you may need to add the -std=c++11 compiler switch to the miscellaneous settings.

Task 1: Implement the selection sort algorithm:

  1. Code the selection sort logic using “bid.title” as the sort field.
  2. Invoke the selectionSort() method from the main() method including collecting and reporting timing results.

Task 2: Implement the quicksort algorithm:

  1. Code the quicksort logic using “bid.title” as the sort field.
  2. Invoke the quickSort() method from the main() method including collecting and reporting timing results.

Here is sample output from running the completed program:

> ./VectorSorting ~/Downloads/eBid_Monthly_Sales.csv
> VectorSorting.exe Downloads\eBid_Monthly_Sales.csv

Loading bids from CSV and performing a selection sort:

 
Example Input Choice: 1 Choice: 3
Display Menu:
1. Load Bids
2. Display All Bids
3. Selection Sort All Bids
4. QuickSort All Bids
9. Exit
Enter choice: 1
Menu:
1. Load Bids
2. Display All Bids
3. Selection Sort All Bids
4. QuickSort All Bids
9. Exit
Enter choice: 3
Output Loading CSV file
eBid_Monthly_Sales.csv
12023 bids read
time: 12023 clock ticks
time: 0.173945 seconds
12023 bids sorted
time: 10623604 clock ticks
time: 10.6236 seconds

Loading bids from CSV and performing a quicksort:

 

 
Example Input Choice: 1 Choice: 4
Display Menu:
1. Load Bids
2. Display All Bids
3. Selection Sort All Bids
4. QuickSort All Bids
9. Exit
Enter choice: 1
Menu:
1. Load Bids
2. Display All Bids
3. Selection Sort All Bids
4. QuickSort All Bids
9. Exit
Enter choice: 4
Output Loading CSV file
eBid_Monthly_Sales.csv
12023 bids read
time: 174985 clock ticks
time: 0.174985 seconds
12023 bids sorted
time: 47964 clock ticks
time: 0.047964 seconds

Note the dramatic difference in the time it takes to sort over 12,000 records – 10.6 seconds versus 4 hundredths of a second!

Your assignment submission must address the following rubric criteria:

  • Code Reflection: A brief explanation of the code and its purpose, and a brief discussion of your experience in developing it, including any issues that you encountered while completing the exercise and what approaches you took to solve them
  • Pseudocode or Flowchart: A pseudocode or flowchart description of the code that is clear and understandable and captures accurate logic to translate to the programming language
  • Specifications and Correctness: Source code must meet its specifications and behave as desired. Correct code produces the correct output as defined by the data and problem; however, you should also produce fully functioning code (with no errors) that aligns with as many of the specifications as possible. You should write your code in such a way that the submitted file executes, even if it does not produce the correct output. You will be given credit for partially correct output that can be viewed and seen to be partially correct.
  • Annotation / Documentation: All code should also be well-commented. This is a practiced art that requires striking a balance between commenting everything, which adds a great deal of unneeded noise to the code, and commenting nothing. Well-annotated code requires you to:
    • Explain the purpose of lines or sections of your code, detailing the approach and method you took to achieve a specific task in the code.
    • Document any section of code that is producing errors or incorrect results.
  • Modular and Reusable: Programmers should develop code that is modular and reusable. If it contains functionality and responsibility in distinct methods, code is more flexible and maintainable. Your code should adhere to the single responsibility principle—classes and methods should do only one job. If you can replace a method with another that uses a different technique or implementation without impacting (having to refactor or rewrite) other parts of your code, then you have succeeded in creating modular methods.
  • Readability: Code needs to be readable to a knowledgeable programmer. In this course, readable code requires:
    • Consistent, appropriate whitespace (blank lines, spaces) and indentation to separate distinct parts of the code and operations
    • Explicit, consistent variable names, which should clearly indicate the data they hold and be formatted consistently: for example, numOrders (camelCase) or item_cost (underscored)
    • Organized structure and clear design that separates components with different responsibilities or grouping-related code into blocks

What to Submit

To complete this assignment, submit the CPP code files and a code reflection and associated pseudocode or flowchart written portion. Your written portion should be 1–2 paragraphs in length.

Supporting Materials

CS 300 Vector Sorting Assignment Student Files.zip
Download this zipped file folder to begin your assignment. The data sets you will use in this assignment are provided in these comma-separated files:

  • eBid_Monthly_Sales.csv (larger set of 12,023 bids)
  • eBid_Monthly_Sales_Dec_2016.csv (smaller set of 77 bids)
  • VectorSorting.cpp program, which is a partially completed program that you can use as a starting point for the assignment
Place Your Order Here

Our Service Charter


1. Professional & Expert Writers: We only hire the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of master’s and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. We are known for timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: We have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.

Format & Features

Our Advantages

How It Works

1. Fill Order Form
2. Make payment
3. Writing process
4. Download paper

Fill in the order form and submit all your files, including instructions, rubrics, and other information given to you by your instructor.

Once you complete filling the forms, complete your payment. We will get the order and assign it to a writer.

When your order is completed, it’s assigned to an editor for approval. The editor approves the order.

Once approved, we will upload the order to your account for you to download.  You can rate your writer or give your customer review.

What Clients Said

{

I am very satisfied! thank you for the quick turnaround. I am very satisfied! thank you for the quick turnaround.I am very satisfied! thank you for the quick turnaround.

5
Mercy M
{

I am very satisfied! thank you for the quick turnaround. I am very satisfied! thank you for the quick turnaround.I am very satisfied! thank you for the quick turnaround.

5
Jane L
{

I am very satisfied! thank you for the quick turnaround. I am very satisfied! thank you for the quick turnaround.I am very satisfied! thank you for the quick turnaround.

4.5
Rayan M

LET US DELIVER YOUR ACADEMIC PAPER ON TIME!

We are a freelance academic writing company geared towards provision of high quality academic papers to students worldwide.

Open chat
1
Scan the code
Hello
Can we help you?