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

  Determine the resulting amortized cost of a single operation

For each of the following functions f, determine the resulting amortized cost of a single operation.

  Describe total cost of ownership and include descriptions

using the module readings and the argosy university online library resources research methods of developing proposals

  How could the shortcoming have been prevented

Using a web browser and a search engine, search the terms "CitiBank backup tapes lost." You will find many results. Select one article and identity what.

  Write press release announcing latest triple-play package

In a 1-page paper, write a press release announcing the latest triple-play package that your telecommunications company is releasing Describe each of the services provided, and why they are 'must have" services for the customer. Be as creative as ..

  Discuss risk mitigation plans in multinational organizations

different depending on the geographical location of the data centers

  Describe the types of role hierarchy constraints

List and define the four types of entities in a base model RBAC system. Describe three types of role hierarchy constraints.

  What minimum number of clicks he has to make in order

Vasya has found a strange device. On the front panel of a device there are: a red button, a blue button and a display showing some positive integer.

  Create a hiring portfolio using the outline

Create a 10- to 15-page hiring portfolio in Microsoft Word using the outline you prepared in M4 Assignment 2. Ensure that you include the table of contents.

  Write a computer program to calculate the potential v

Write a general computer program to calculate the potential V, E, D, Q+ and the capacitance C between two conducting surfaces separated by a dielectric material

  What type of planning did or did not take place

Use the Internet to locate one incident of disaster recovery that was successful and one incident that was not successful.

  Research various decision-making process options

Research various decision-making process options and the advantages and disadvantages of each. Select a decision-making process, or design your own process using your research as a guide.

  Just-in-timejit software is not able to foresee delivery

question 1. just-in-timejit software is unable to foresee delivery problems resulting from bad weather labor strikes

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