Giter VIP home page Giter VIP logo

inputgetter's Introduction

InputGetter

InputGetter simplifies the input getting process. More information is provided below

Summary:

The program is designed to simplify the input getting process. It was written, after I got tired of writing a new input processor method for every program. Currently, I don't have time to add enough comments as this is a program I wrote to simplify my homework assignments and I never had intentions of publishing it until now. I will add more comments when the chance comes. If there are any problems you encounter please feel free to point them out. You may also make changes as needed.

Methods

getInt

getInt is the method responsible for prompting the user for integer input and validating the user input. It uses a do-while loop with a try-catch statement on the inside to prompt the user for integer input until they supply integer input. Once it gets the right input, the method returns the validified user input. This method has one parameter object of type Scanner.This method will be seeing some some changes in the near future.

getDouble

This method is identical to getInt method. The only, and obvious difference, is that it prompts and gets input of type double from the user. This method also takes in a parameter object of type Scanner.

getAlphaString

This method prompts the user for a string consisting of only letters. It prompts the user for String input, feeds that input to isAlpha() which checks each character in the String and returns false if there's any non-alphabetical character in the input. This method returns a String of only letters. This method takes a parameter object of type Scanner.

isAlpha

This method takes a parameter of type String and checks whether or not each and every character in that String is a letter or not. If it is it returns true, otherwise, it returns false. This the only private method in this class, and it cannot be by methods outside of the class.

inputgetter's People

Contributors

haga14 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.