Cookie Consent by Free Privacy Policy Generator Computer Science: Programming with a Purpose Week 8 Quiz Answers - Coursera!

The basis for education in the last millennium was “reading, writing, and arithmetic;” now it is reading, writing, and computing. Learning to program is an essential part of the education of every student, not just in the sciences and engineering, but in the arts, social sciences, and humanities, as well. Beyond direct applications, it is the first step in understanding the nature of computer science’s undeniable impact on the modern world. 

This course covers the first half of our book Computer Science: An Interdisciplinary Approach (the second half is covered in our Coursera course Computer Science: Algorithms, Theory, and Machines). 

Our intent is to teach programming to those who need or want to learn it, in a scientific context. 

You can enroll here:


Computer Science: Programming with a Purpose Week 8 Quiz Answers - Coursera!

Coursera Computer Science: Programming with a Purpose Week 8 Quiz Answers!

Abstract Data Types

Question 1) What is an object?

A variable name
Something that holds a data type value
A data type whose representation is hidden
A data type 
A data type value

Question 2) Which of the following do you need to know in order to use a data type in Java? Mark all that apply.

Its name
How to create new objects
How to destroy objects
How objects are represented
How to apply operations to an object

Question 3) What does the following code fragment print?

String string1 = "hello"; 
String string2 = string1; 
string1 = "world"; 
Stdout.println(string1 + string2);

worldhello
hellohello
helloworld
worldworld

Question 4) Consider the following code fragment:

String t = example.substring(5, 8);

Which of the following are true after this code is executed? Mark all that apply.
 
(s.length() == t.length() is true
s and t refer to the same data-type value
(s == t) is false
s and t refer to different strings
(s.equals(t)) is true

Post a Comment

Previous Post Next Post