Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What's wrong? Write a Java program with a class named Introduction that prints: 1. Your name. 2. A blank line. 3. Your favorite short poem

image text in transcribedimage text in transcribedimage text in transcribedWhat's wrong?

Write a Java program with a class named Introduction that prints: 1. Your name. 2. A blank line. 3. Your favorite short poem (or first several lines of your favorite poem). This must be at least three lines long and no more than seven lines long. 4. The author of the poem, indented four spaces and preceded by two hyphens. If you don't know who the author was, use Anonymous. 5. A blank line. 6. Your age in years. 7. Your moderate intensity exercise heart rate, calculated by subtracting your age from 220, then multiplying that result by 0.60. Have Java do the calculation. You might get a lot of decimal places as in the following example. That's . 8. The result of multiplying 12345679 times your favorite one-digit number times 9 -- have Java do the calculation. Don't choose zero as your one-digit number. Do not put the digit 8 in 12345679. Here is a sample of what my output might look like. Your output must not be identical to this output. I put in question marks for the result of step 8, because I do not want to ruin the surprise for you. My name is David Eisenberg. Beneath these high cathedral stairs Lie the remains of Susan Pares. Her name was wiggs; it was not Pares, But Pares was put to rhyme with stairs. -- Edward Lear 66 92.39999999999999 ????? The name of your Java class must be Introduction. When you finish, upload the Introduction.java file. Introduction.java X 1 public class Introduction 2 public static void main (String args[] { System.out.println (KHAI TRUONG); 4 System.out.println(""); System.out.println("I wandered lonely as a cloud"+" That floats on high o'er vales and hills,"+" When all at once I saw a crowd"); 6 System.out.println(" -- WILLIAM WORDSWORTH"); 7 System.out.println(""); 8 System.out.println (25); 9 double heartrate= (220-25) *0.60; 10 System.out.println (heartrate); 11 double val=12345679*4*9; 12 System.out.println(val); 13 } 14 - } C. C:\Windows\SYSTEM32\cmd.exe Error: Could not find or load main class Introduction Caused by: java.lang.ClassNotFoundException: Introduction (program exited with code: 1) Press any key to continue

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

Database Concepts

Authors: David Kroenke, David J. Auer

3rd Edition

0131986252, 978-0131986251

More Books

Students also viewed these Databases questions

Question

Write short notes on Interviews.

Answered: 1 week ago

Question

Define induction and what are its objectives ?

Answered: 1 week ago

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago