Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

QUESTION 1 Imagine you are writing a program that stores a student's year (Freshman, Sophomore, Junior, or Senior), the number of courses the student is

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

QUESTION 1 Imagine you are writing a program that stores a student's year (Freshman, Sophomore, Junior, or Senior), the number of courses the student is taking, and his or her GPA on a 4.0 scale. Declare variables with the appropriate names and types to hold this information. Write a complete variable declaration statement with the type, the variable name, and a semicolon. O a. String year = "Freshman"; int courses Taken = 7: double spa = 4; O b. String year = "Freshman"; int courses taken = 7 double GPA = 4.0: c. String year = "Freshman"; Int courses Taken = 7.0: double spa = 4.0 d. String year = "Freshman"; int coursesTaken = 7; double GPA = 4.0) QUESTION 25 Evaluate the following expression. Make sure to give a value of the appropriate type (such as including a decimal point in a double), 10 + 10 * Math.random()) O a. A number between 10.0 (inclusive) and 20.0 (exclusive) O b. A number between 10.0 (inclusive) and 20.0 (inclusive) O c. 10.0 O d. 15.0 QUESTION 26 The System.out.println command works on many different types of values, including ints and doubles What is the term for such a method? a. overrate b. overload c. Override d. overwrite e. overfloat QUESTION 27 Evaluate the following expression. Make sure to give a value of the appropriate type (such as including a decimal point in a double). Math.sqrt(64 + 17) O a. 9 O b. 8 O c. 8.0 d. 9.0 QUESTION 28 Which of the following is the correct syntax for a method header with parameters? O a. public int static sum (int x, inty} { O b. public static int sum (int x, int y) { C. public int static sum (int x; int y) { O d. public static sum (int x, int y){ QUESTION 30 Evaluate the following expression. Make sure to give a value of the appropriate type (such as including a decimal point in a double). Math.sqrt(25 % 100) O a.5 b. 10.0 O c. 5.0 O d. 50.0 TILAN

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

The Database Experts Guide To SQL

Authors: Frank Lusardi

1st Edition

0070390029, 978-0070390027

More Books

Students also viewed these Databases questions

Question

What was the role of the team leader? How was he or she selected?

Answered: 1 week ago

Question

What were the issues and solutions proposed by each team?

Answered: 1 week ago