/*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none} Free solutions & answers for Fundamentals of Java: AP Computer Science Chapter 3 - (Page 1) [step by step] | 91Ó°ÊÓ

91Ó°ÊÓ

Problem 1

What is the difference between double and int data types?

Problem 1

Write code segments that perform the following tasks: a. Prompt the user for an hourly wage and read the wage into a double variable wage. b. Prompt the user for a Social Security number and read this value into the string variable ssn.

Problem 1

At what point in the program development process are syntax errors, run-time errors, and logic errors detected?

Problem 1

What is the vocabulary of a language? Give an example of an item in the vocabulary of Java.

Problem 2

State two rules of thumb for writing appropriate comments in a program.

Problem 2

The following program contains a logic error. Describe where to insert the appropriate debugging statements to help locate the error: import java. util. Scanner; public class AreaTriangle\\{ public static void main(String [] args) \\{ double base, height, area; Scanner reader = new Scanner (System. in); System.out.print("Enter the base of the triangle:"); base \(=\) reader nextDouble( ); system.out.print("Enter the height of the triangle: "); height = reader.nextDouble(); area \(=\) base \(+\) height \(/ 2\); system.out.println("The area is " + area);

Problem 2

Give an example of a run-time error and explain why the computer cannot catch it earlier in the program development process.

Problem 3

Convert the following floating-point numbers to exponential notation: a. \(23.5\) b. \(0.046\)

Problem 4

Describe two differences between programming languages and natural languages.

Problem 4

Convert the following numbers from exponential notation to floating-point notation: a. \(32.21 \mathrm{E4}\) b. \(55.6 \mathrm{E}-3\)

Access millions of textbook solutions in one place

  • Access over 3 million high quality textbook solutions
  • Access our popular flashcard, quiz, mock-exam and notes features
  • Access our smart AI features to upgrade your learning
Access millions of textbook solutions in one place

Recommended explanations on Computer Science Textbooks