Algorithm bubble sort

Assignment Help Data Structure & Algorithms
Reference no: EM13764008

Programming Project

This project focuses on an integration and demonstration of the knowledge and skills in this course with regard to the process of creating an algorithm to solve a problem and implementing that algorithm in the form of a working C language program. The project is due by Week 10, but there is lab time allocated for working on the project during weeks 6 through 9. The project is a significant portion (20%) of your course grade:

Purpose

This project is a great opportunity to express your unique problem solving skills as well as your use of structured logic. The project program requires, at a minimum, the use of decision structures, loops, properly named and typed variables, functions, arrays, and strings. The user interface is to have a menu of choices for input, and the output is to be well-formatted. The use of file I/O may be incorporated into the project, but is not required.

Project Logistics

You are required to write an original program for this project. Everyone is going to be developing an application menu program that has three defined application options to implement. Each student can choose, propose, and implement a fourth menu application option for extra credit. You may get ideas by reviewing the end-of-chapter programming projects in the textbook, or from your other courses or interests that you'd like to work with.

Project Requirements

An application menu program with the three application options described next is required. As mentioned above, a fourth application defined by you is optional. This application menu program builds on the Week 4 Lab Task 2 basic menu system program that you completed. The program prompts the user to choose the number of the application to run:

1 for the calculator application

2 for the sort a list of integers (smallest to largest) application

3 for the pluralize a noun application

4 for your chosen application (optional)

The user can run each application chosen as long as desired, and then gets to select another application to run. The user is instructed to enter 0 (zero) to exit the application menu program.

The calculator application is described in detail as programming project 10 on page 371 of your textbook. Instead of writing a function scan_data() that requires output parameters, I'd recommend reading in the operator and right operand from the calculator control function and validating both were read in, using another function to validate the operator is supported. For the function do_next_op(), it's fine to have three input parameters and returns the result. You'll also want to skip the rest of the data line before reading in any next operator and right operand. See Figure 5.14 on page 275 of your textbook for one way to do this.

The sort application uses an algorithm known as the bubble sort. This technique is described in programming project 13 on page 450 of your textbook. More details are provide next.

A bubble sort makes passes through a list, looking at pairs of adjacent elements to swap if not in the desired order. When a complete pass of the list is made where no swaps occur, the elements are in order. In the example that follows, elements swapped during a pass are bolded and underlined. You should limit the number of integers to sort at a time in your program.

The pluralize noun application is described in programming project 5 on pages 514 and 515 of your textbook. The rules and some nouns to try are included. The definition of a noun for this application is a word in all lower case letters with at least two letters. You should set, and notify users of, the maximum length of the nouns to pluralize in your program. Outside of warning the user that entering a noun not meeting the definition can produce unexpected results, you do not need to validate the nouns from the user. Not all words are correctly pluralized by this application and you are not required to fix this!

Reference no: EM13764008

Questions Cloud

How play macbeth relates to human nature : Shakespeare's Macbeth is often considered one of literature's greatest tragedies, because of Macbeth's tragic fall from grace, but because of how the play relates to human nature and the conflicts inherent in human nature.
Why is an enterprise security an importance piece : Why is an Enterprise Security an importance piece to the success of a business
What did you learn about the innocence project : What did you learn about the Innocence Project and eyewitness identification? What surprised you the most
Research paper about social problems : Prepare a five page research paper about social problems where the free markets are not allowed to function, which includes the market for a particular illegal good and service, a regulated market, etc.
Algorithm bubble sort : This project is a great opportunity to express your unique problem solving skills as well as your use of structured logic.
Write a review of case study abc inc and carl robins : Write a review of Case Study ABC, Inc. Case-Study Analysis and Carl Robins Case Study Analysis Papers from members of your Learning Team. Use the Case Study Analysis Peer Review Form as a guide for your reviews.
Develop a proposal for implementing it security management : Utilizing your comprehensive Security plan outline, develop a proposal for implementing IT Security Management.
Analyze these facts using ethical concepts or concerns : When Jonas had been questioned by the police at the station, he claimed he knew nothing of the incident, and the police have no evidence tying Jonas to the disappearance or murder. Analyze these facts using ethical concepts or concerns
Explain reasons for human population increase : Define population dynamics and discuss factors which affect population's dynamics.

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Prepare a currency conversion design

currency conversion design pseudocodeprogram pseudocodestart main moduledeclare option 0declare value 0declare

  Testing item in array of member using sequential search

Look up each test item in array of member items, by using sequential search. What is the worst-case running time of it. (asymptotically, in terms of n and k)?

  Draw a flowchart for the algorithm

Compute the final answer by rounding the last value to 4 decimal places type the computed value at the bottom of the list and Draw a flowchart for the algorithm below and have it checked by the TA

  Q1 consider the hire assistant problem we interview n

q1 consider the hire assistant problem. we interview n candidates and always hire the best qualified so far. let n 5

  Data structure used to implement an associative structure

In computing, a hash table (such as a Java HashMap) is a data structure used to implement an associative structure that maps keys to values.

  Algorithm on dynamic programming-minimize amount of walking

Our goal is to plan this trip so that we minimize the maximum amount of walking done in a single day. Your algorithm should be based on dynamic programming and run efficiently.

  Describe ways to generalize a simple sorting algorithm

Describe ways to generalize a simple sorting algorithm (such as insertion sort, or any other sort you are familiar with) to support this generalization

  Question about disk writing speed

Think about a disk holding documents with an average file length of 5 KB. Each document is allocated contiguously on adjacent sectors.

  Determining worst-case time complexity

The recent discovery of the following fragment of uncommented procedural C code in the Sunlab has caused a big scandal. What is the worst-case time complexity of foo(a,1,N,k), and for which inputsdoes it occur?

  Algoithm to select to describe intrinsically recursive

Algoithms you select so you can describe and assess them. Write challenges did you face in process? How did you go about resolving them?

  Divide-and-conquer two-dimensional closest-pair algorithm

consider the version of the divide-and-conquer two-dimensional closest-pair algorithm in which, instead of presorting input set P, we simply sort each of the two sets Pl and Pr in nondecreasing order of their y coordinates on each recursive call

  In the following problems you will need tobulldefine the

in the following problems you will need tobulldefine the problem by constructing a defining diagrambullcreate a

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