Skip to content

quiroz-dom-dev/Stack_Sorting_Program

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Stack_Sorting_Program (Project #5)

Table of Contents

Description

This program implements a stack Java sorting solution which sorts integers submitted by the user from smallest to largest.

Use Case

This program can be used to sort through a large list of integers. For example, collecting a list of student birth dates to understand how many students are born in the same number (day of the month).

Features

  • Error Handling. The program will only accept positive or negative integers.
  • Uses Keyword 'done' to follow through with the sorting process.
  • Uses a loop to continue asking the end user for intergers until the sorting keyword is entered.
  • Returns sorted array with a descriptions stating "Sorted Stack"

How to Run

-Run the code directly from your Java compiler or find one online. -The program will start by displaying "Enter the numbers you wish to add (separated by spaces), then press enter: " -The program will end by displaying the sorted list of numbers.

Test Case

Input: Enter the numbers you wish to add (separated by spaces), then press enter: 56 12 78 22 45

Add more numbers (separated by spaces), or enter 'done' to sort your list: done

Output: Sorted Stack (Smallest to Largest): 78 56 45 22 12

Dependencies

Java 8 or later. Java

Contributing

Collaboration or Reuse are welcome. Feel free to open an issue to the dicuss the changes you are looking to make.

License

Project is licensed under MIT License. License: MIT

About

This program implements a Stack Java program which sorts integers submitted from smallest to largest.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages