Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Submit the Java source file containing a Java program which prompts the user to enter the name of the person. Stores the name of person

Submit the Java source file containing a Java program which

  1. prompts the user to enter the name of the person.
  2. Stores the name of person in a string variable.
  3. Prompts the user to enter the age of the person.
  4. Stores the age of the person in a variable of type Integer.
  5. Retrieve each ascii value of each character of the stored name (which was done in step 2).
    1. To get the ascii value of a character value...just cast it to int. for example.

Char c = 'a';

int asciival = (int) c;

  1. Calculate the sum of all ascii values of each character in the name and store it in a variable of type double.
  2. Divide the calculated sum of ascii values by the stored age of the person and store it in a variable of type double.
  3. Display the above calculated value as "Astrological Code" with decimal points upto 2 places.
  4. Display all the other values stored and calculated above

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Databases questions

Question

b) x55yz y (z) (x=7/y (20) 11 14 11

Answered: 1 week ago

Question

Discuss the guidelines for acting ethically

Answered: 1 week ago

Question

Describe the two broad categories of ethical theories

Answered: 1 week ago

Question

Describe the organizational influences on ethical conduct

Answered: 1 week ago