All Matches
Solution Library
Expert Answer
Textbooks
Search Textbook questions, tutors and Books
Oops, something went wrong!
Change your search query and then try again
Toggle navigation
FREE Trial
S
Books
FREE
Tutors
Study Help
Expert Questions
Accounting
General Management
Mathematics
Finance
Organizational Behaviour
Law
Physics
Operating System
Management Leadership
Sociology
Programming
Marketing
Database
Computer Network
Economics
Textbooks Solutions
Accounting
Managerial Accounting
Management Leadership
Cost Accounting
Statistics
Business Law
Corporate Finance
Finance
Economics
Auditing
Hire a Tutor
AI Study Help
New
Search
Search
Sign In
Register
study help
computer science
java software solutions
Questions and Answers of
Java Software Solutions
SR 2.31 Why are widening conversions safer than narrowing conversions?
SR 2.32 Identify each of the following conversions as either a widening conversion or a narrowing conversion. a. int to long b. int to byte C. byte to short d. byte to char e. short to double
SR 2.33 Assuming result is a float variable and value is an int variable, what type of variable will value be after the following assignment statement is executed? Explain. result = value;
SR 2.34 Assuming result is a float variable that contains the value 27.32 and value is an int variable that contains the
SR 2.35 Given the following declarations, what result is stored by each of the following assignment statements? int iResult, num1 = 17, num2 = 5; double fResult, vall = 12.0, val2 = 2.34; a. iResult
SR 2.36 Identify which line of the Gas Mileage program does each of the following. a. Tells the program that we will be using the Scanner class. b. Creates a scanner object. c. Sets up the scanner
SR 2.37 Assume you already have instantiated a scanner object named myscanner and an int variable named value as follows in your program: Scanner myScanner = new Scanner(System.in); int value = 0;
EX 2.1 What is the difference between the literals 4, 4.0, '4', and "4"?
EX 2.2 Explain the following programming statement in terms of objects and the services they provide: System.out.println("I gotta be me!");
EX 2.3 What output is produced by the following code fragment? Explain. System.out.print ("Here we go!"); System.out.println("12345"); System.out.print ("Test this if you are not sure.");
EX 2.4 What is wrong with the following program statement? How can it be fixed? System.out.println("To be or not to be, that is the question.");
EX 2.5 What output is produced by the following statement? Explain. System.out.println("50 plus 25 is +50+25);
EX 2.6 What is the output produced by the following statement? Explain. System.out.println("He thrusts his fists \tagainst" "the post and still insists \the sees the \"ghost\"");
EX 2.7 What value is contained in the integer variable size after the following statements are executed? size = 18; size size + 12; size=size * 2; size size / 4;
EX 2.8 What value is contained in the floating point variable depth after the following statements are executed? depth = 2.4; depth = 20 depth * 4; depth depth / 5;
EX 2.9 What value is contained in the integer variable length after the following statements are executed? length = 5; length *= 2; length *= length; length /= 100;
EX 2.10 Write four different program statements that increment the value of an integer variable total.
EX 2.11 Given the following declarations, what result is stored in each of the listed assignment statements? int iResult, num1 = 25, num2 40, num3 = 17, num4 = 5; double fResult, vall = 17.0, val2 =
EX 2.12 For each of the following expressions, indicate the order in which the operators will be evaluated by writing a number beneath each operator. a. a b c d b. a - b + c d C. a + b/c / d d. a b c
SR 1.1 What is hardware? What is software?
SR 1.2 What are the two primary functions of an operating system?
SR 1.3 The music on a CD is created using a sampling rate of 44,000 measurements per second. Each measurement is stored as a number that represents a specific voltage level. How many such numbers are
SR 1.4 What happens to information when it is stored digitally?
SR 1.5 How many unique items can be represented with the following? a. 2 bits b. 4 bits c. 5 bits d. 7 bits
SR 1.6 Suppose you want to represent each of the 50 states of the United States using a unique permutation of bits. How many bits would be needed to store each state representation? Why?
SR 1.7 How many bytes are there in each of the following? a. 3 KB b. 2 MB c. 4 GB
SR 1.8 How many bits are there in each of the following? a. 8 bytes b. 2 KB c. 4 MB
SR 1.9 The music on a CD is created using a sampling rate of 44,000 measurements per second. Each measurement is stored as a number that represents a specific voltage level. Suppose each of these
SR 1.10 What are the two primary hardware components in a computer? How do they interact?
SR 1.11 What is a memory address?
SR 1.12 What does volatile mean? Which memory devices are volatile and which are nonvolatile?
SR 1.13 Select the word from the following list that best matches each of the following phrases:
SR 1.14 What is a file server?
SR 1.15 What is the total number of communication lines needed for a fully connected point-to-point network of five computers? Six computers?
SR 1.16 Describe a benefit of having computers on a network share a communication line. Describe a cost/drawback of sharing a communication line.
SR 1.17 What is the etymology of the word Internet?
SR 1.18 The TCP/IP set of protocols describes communication rules for software that uses the Internet. What does TCP stand for? What does IP stand for?
SR 1.19 Explain the parts of the following URLs: a. duke.csc.villanova.edu/jss/examples.html b. java.sun.com/products/index.html
SR 1.20 When was the Java programming language developed? By whom? When was it introduced to the public?
SR 1.21 Where does processing begin in a Java application?
SR 1.22 What do you predict would be the result of the following line in a Java program? System.out.println("Hello"); // prints hello
SR 1.23 What do you predict would be the result of the following line in a Java program? // prints hello System.out.println("Hello");
SR 1.24 Which of the following are not valid Java identifiers? Why? a. RESULT b. result C. 12345 d. x12345y e. black&white f. answer_7
SR 1.25 Suppose a program requires an identifier to represent the sum of the test scores of a class of students. For each of the following names, state whether or not each is a good name to use for
SR 1.26 What is white space? How does it affect program execution? How does it affect program readability?
SR 1.27 We all know that computers are used to perform complex jobs. In this section, you learned that a computer's instructions can do only simple tasks. Explain this apparent contradiction.
SR 1.28 What is the relationship between a high-level language and a machine language?
SR 1.29 What is Java bytecode?
SR 1.30 Select the word from the following list that best matches each of the following phrases:
SR 1.31 What do we mean by the syntax and semantics of a programming language?
SR 1.32 Categorize each of the following situations as a compile-time error, run-time error, or logical error. a. Misspelling a Java reserved word. b. Calculating the average of an empty list of
SR 1.33 List the five general steps required to solve a problem.
SR 1.34 Why is it important to consider more than one approach to solving a problem? Why is it important to consider alternatives early in the process of solving a problem?
SR 1.35 What are the primary concepts that support object- oriented programming?
EX 1.1 Describe the hardware components of your personal computer or of a computer in a lab to which you have access. Include the processor type and speed, storage capacities of main and secondary
EX 1.2 Why do we use the binary number system to store information on a computer?
EX 1.3 How many unique items can be represented with each of the following? a. 1 bit b. 3 bits c. 6 bits d. 8 bits e. 10 bits f. 16 bits
EX 1.4 If a picture is made up of 128 possible colors, how many bits would be needed to store each pixel of the picture? Why?
EX 1.5 If a language uses 240 unique letters and symbols, how many bits would be needed to store each character of a document? Why?
EX 1.6 How many bits are there in each of the following? How many bytes are there in each? a. 12 KB
EX 1.7 Explain the difference between random access memory (RAM) and read-only memory (ROM).
EX 1.8 A disk is a random access device but it is not RAM (random access memory). Explain.
EX 1.9 Determine how your computer, or a computer in a lab to which you have access, is connected to others across a network. Is it linked to the Internet? Draw a diagram to show the basic
EX 1.10 Explain the differences between a local-area network (LAN) and a wide-area network (WAN). What is the relationship between them?
EX 1.11 What is the total number of communication lines needed for a fully connected point-to-point network of eight computers? Nine computers? Ten computers? What is a general formula for
EX 1.12 Explain the difference between the Internet and the World Wide Web.
EX 1.13 List and explain the parts of the URLs for a. your school b. the Computer Science department of your school c. your instructor's Web page
EX 1.14 Give examples of the two types of Java comments and explain the differences between them.
EX 1.15 Which of the following are not valid Java identifiers? Why? a. Factorial b. anExtremelyLong Identifier If You AskMe C. 2nd Level d. level2 e. MAX_SIZE f. highest$ g. hook&ladder
EX 1.16 Why are the following valid Java identifiers not considered good identifiers? a. q b. totVal C. theNextValueInTheList
EX 1.17 Java is case sensitive. What does that mean?
EX 1.18 What is a Java Virtual Machine? Explain its role.
EX 1.19 What do we mean when we say that the English language is ambiguous? Give two examples of English ambiguity (other than the example used in this chapter) and explain the ambiguity. Why is
EX 1.20 Categorize each of the following situations as a compile-time error, run-time error, or logical error. a. multiplying two numbers when you meant to add them b. dividing by zero
PP 1.1 Enter, compile, and run the following program: public class Test public static void main(String[] args) System.out.println("An Emergency Broadcast");
PP 1.2 Introduce the following errors, one at a time, to the program from PP 1.1. Record any error messages that the compiler produces. Fix the previous error each time before you introduce a new
PP 1.3 Write a program that prints, on separate lines, your name, your birthday, your hobbies, your favorite book, and your favorite movie. Label each piece of information in the output.
PP 1.4 Write a program that prints a list of four or five Web sites that you enjoy. Print both the site name and the URL.
PP 1.5 Write a program that prints the first few verses of a song (your choice). Label the chorus.
PP 1.6 Write a program that prints the outline of a tree using asterisk (*) characters.
PP 1.7 Write a program that prints a paragraph from a novel of your choice.
PP 1.8 Write a program that prints the phrase knowledge is Power: a. on one line b. on three lines, one word per line, with the words centered relative to each other
PP 1.9 Write a program that prints the following diamond shape. Don't print any unneeded characters. (That is, don't make any character string longer than it has to be.) *** ***** **
PP 1.10 Write a program that displays your initials in large block letters. Make each large letter out of the corresponding regular character. For example: JJJJJJJJJJJ LLLL JJJJJJJ LLLL JJJJ AAA AAA
SR 2.1 What is a string literal?
SR 2.2 What is the difference between the print and println methods?
SR 2.3 What is a parameter?
SR 2.4 What output is produced by the following code fragment? System.out.println("One "); System.out.print ("Two "); System.out.println("Three ");
SR 2.5 What output is produced by the following code fragment? System.out.print ("Ready "); System.out.println(); System.out.println("Set "); System.out.println(); System.out.println("Go ");
SR 2.6 What output is produced by the following statement? What is produced if the inner parentheses are removed?
SR 2.7 What is an escape sequence? Give some examples.
SR 2.8 Write a single printin statement that will output the following exactly as shown (including line breaks and quotation marks). "I made this letter longer than usual because I lack the time to
SR 2.9 What is a variable declaration?
SR 2.10 Given the following variable declarations, answer each question. int count = 0, value, total; final int MAX VALUE = 100; int myValue = 50; a. How many variables are declared? b. What is the
SR 2.11 Your program needs a variable of type int to hold the number of CDs in a music collection. The initial value should be zero. Write a declaration statement for the variable.
SR 2.12 Your program needs a variable of type int to hold the number of feet in a mile (5280). Write a declaration statement for the variable.
SR 2.13 Briefly describe three reasons for using a constant in a program instead of a literal value.
SR 2.14 What is primitive data? How are primitive data types different from objects?
SR 2.15 How many values can be stored in an integer variable?
SR 2.16 What are the four integer data types in Java? How are they different?
Showing 700 - 800
of 978
1
2
3
4
5
6
7
8
9
10