Write a program that reads from the console

Assignment Help JAVA Programming
Reference no: EM132081435

You are needing help with creating a simple Java program. Here is the exercise:

Write a program that reads from the console, a person's first name, current age, and a year in the future and then displays the person's name and future age based on the future year. Your main will gather the input and then call a method displayFutureAge(name, currentage, futuredate) that will calculate the future age, based off of the year 2016, and then display the information. Use simple arithmetic to calculate the future age.

For example,

Enter name: Tom

Enter current age: 33

Enter future year: 2050

Output will be:

Tom will be 67 years old in the year 2050.

Reference no: EM132081435

Questions Cloud

What command do you use in order to obtain root privileges : What command would you use to get a more detailed view of the users who are currently on your system?
Limited liability company : One Saturday, Crystal was doing Lynette's hair when she accidentally caused a second degree burn to her scalp. Lynette began bleeding and screamed
Create and implement a binary search algorithm : Create and implement Insertion sort algorithm which will sort the array before the Binary Search algorithm is executed.
Applying the applicable law : If so, please clearly articulate their respective liability, if any, applying the applicable law. I.R.A.C.
Write a program that reads from the console : Write a program that reads from the console, a person's first name, current age, and a year in the future and then displays the person's name.
Write a function called lowertrim that takes two arguments : Write a function called lowerTrim that takes 2 arguments: x and trimBelow. This function takes the average of those values in x .
Fail?er considering? employees and ?leaders : ?Around 200,000 Motrin liquids which are used for infants was recalled by ?the ?j?ohnson? and john?son ?company because it contained particles of plastic.
Shanetta and crystal are general partners : One Saturday, Crystal was doing Lynette's hair when she accidentally caused a second degree burn to her scalp. Lynette began bleeding and screamed in pain
Write two separate c programs for client and server : Write 2 separate C programs, a client & server. The client makes a connection to the server and transmits a series of numbers.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Question hierarchy of section

Add a class AnyCorrectChoiceQuestion to the question hierarchy of Section 9.1 that allows multiple correct choices. The respondent should provide any one of the cor- rect choices. The answer string should contain all of the correct choices, separa..

  Create a gui program that displays the text

Create a GUI program that displays the text "Hello." Create a dropdown list to select the language the text is displayed in. Use English, German, French

  Use of java api to perform interactive i/o in java

To gain experience designing and writing your own Java Program, To use of Java APIs to perform interactive I/O in Java programming, To declare variables and constants appropriately

  Are you doing your homework

Are you doing your homework? What do you think? Are you having fun? You call that fun -

  Write a function to compute the amount of taxes

ITEC 136- In a separate JS file, write a function to compute the amount of taxes that should be withheld from a paycheck based on the gross pay. The function should receive one parameter, the gross pay.

  Create your characters

ITECH1000/5000: Programming Assignment 1 - Summer Semester 2015. At present, the following menu items are working: Create your characters; Display formatted information of all characters; Display a particular character

  Define a class datetime which has integer attributes day

Define a class DateTime which has integer attributes day, month, year and time(Use Military time, 1:00pm is 1300, no colon). Make DateTime Serializable and Comparable.

  Why the java is called platform independent

Why the Java is called platform independent? Discuss.

  Complete the loops to print the harshad numbers

Complete the loops to print the Harshad numbers in the range of 1 to 1000 - public class Harshad

  Describe how a semaphore can be used to act like a lock.

The loop should execute until a "shutdown" flag is set to true on the runnable object executing in the thread.

  Simulating the behaviour of a train management system

You will develop the component classes of a program for simulating the behaviour of a train management system - You must implement these classes as if other programmers were, at the same time, implementing the code that instantiates them and calls t..

  Discuss web security strategies and components

Research and evaluate how the 3-Tiers interact in defense in depth strategies. Differentiate between the 3-Tiers.

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