Write a java program which validates that the entry

Assignment Help Computer Engineering
Reference no: EM132200473

Write a java program which:

1. Asks the user to enter a positive integer greater than 0

2. Validates that the entry is a positive integer

3. Outputs the digits in reverse order with a space separating the digits

4. Outputs the even digits not in reverse order with a space separating the digits (consider zero to be even)

5. Outputs the odd digits not in reverse order with a space separating the digits

6. Allows user is to repeat/continue the program as many times as he/she wants

7. Keeps a record in a txt file named outDataFile.txt with the history of all numbers entered and the associated results, in the following format:

the original number is 1023

the number reversed 3 2 0 1

the even digits are 0 2

the odd digits are 1 3

-----------------

the original number is 102030

the number reversed 0 3 0 2 0 1

the even digits are 0 2 0 0

the odd digits are 1 3

-----------------

In addition:
8. The program must have the following four void methods:

a. validate //validate user input

b. reverse // output reverse digits to screen and txt file

c. even //output even digits to screen and txt file

d. odd //output odd digits to screen and txt file

Reference no: EM132200473

Questions Cloud

Write a gui application for the webbuy company : The "Message:" area should allow multiple lines of input and be able to scroll if necessary to accommodate a long message.
Record the name of the person and their score : Write the guessing game (1-1000). AND: Record the name of the person and their score # guesses taken) in a database.
What annual cash flow is needed to make the plant profitable : At a 7 percent discount rate, what annual cash flow is needed to make the 500-megawatt plant profitable? What about using NG at half the cost of coal?
Write an inheritance hierarchy of three-dimensional shapes : Create an abstract class that represents all ThreeDimensionalShapes and has methods for finding the volume and surface area of the shapes.
Write a java program which validates that the entry : Write a java program which Validates that the entry is a positive integer and Outputs the digits in reverse order with a space separating the digits.
How might you measure the direct output of the state : How might you measure the direct output of the state? How might that differ from the consumer output that citizens experience?
Encapsulates statistics for summer job salaries for a group : Write a java class (and a client class to test it) that encapsulates statistics for summer job salaries for a group of people over several years.
Calculate the wavelength for the electronic transition : Calculate the wavelength (in nm) for the electronic transition from n = 3 to n = 5 in the hydrogen atom.
What kind of shots are mostly used in the film and why : Is there any symbolical use in using the colors black and white in the Streetcar film? Is there any particular symbolism conveyed in the film.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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