OOP_Lecture 07 & 08

OOP_Lecture 07 & 08

University

6 Qs

quiz-placeholder

Similar activities

Demo 2

Demo 2

University

11 Qs

Tynker Tynker

Tynker Tynker

3rd Grade - Professional Development

9 Qs

Weekly Contest #11

Weekly Contest #11

University

10 Qs

Chapter 5_Labview [Measurement Engineering, MMT]

Chapter 5_Labview [Measurement Engineering, MMT]

University

9 Qs

AI & Machine Learning

AI & Machine Learning

1st Grade - University

10 Qs

Java and MySQL Quiz

Java and MySQL Quiz

University

11 Qs

Coding dan Kecerdasan Artifisial/AI

Coding dan Kecerdasan Artifisial/AI

1st Grade - University

10 Qs

Hari 3 - Kuis Coding dan Perkenalan AI

Hari 3 - Kuis Coding dan Perkenalan AI

KG - Professional Development

10 Qs

OOP_Lecture 07 & 08

OOP_Lecture 07 & 08

Assessment

Quiz

Education

University

Hard

Created by

lecturer note

FREE Resource

6 questions

Show all answers

1.

OPEN ENDED QUESTION

3 mins • 1 pt

Write a Java statement that declares a string array initialized with the following strings:

"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday" and "Saturday".

After that, write a loop that displays the contents of each element in the array that you declared.

Evaluate responses using AI:

OFF

2.

OPEN ENDED QUESTION

3 mins • 1 pt

Write a program that creates an array of 10 elements size. Your program should prompt the user to input numbers in array and then display the sum of all array elements.

Evaluate responses using AI:

OFF

3.

OPEN ENDED QUESTION

3 mins • 1 pt

4. The variable list1 and list2 are reference arrays that each have 5 elements. Write code that copies the values in list1 to list2. Values in list1 are input by user.

Evaluate responses using AI:

OFF

4.

OPEN ENDED QUESTION

3 mins • 1 pt

Write a Java program and use for loop to find the largest and smallest element of an array.

Evaluate responses using AI:

OFF

5.

OPEN ENDED QUESTION

3 mins • 1 pt

Write a Java program that creates an array of int and initializes it with the values 3, 2, 5, and 1. Then, use a while loop to find and print the smallest element in the array.

Evaluate responses using AI:

OFF

6.

OPEN ENDED QUESTION

3 mins • 1 pt

Write a Java program that creates an array of integers and initializes it with the values 2, 4, 6, 8, and 10. Then, use a do-while loop to calculate and print the product of all the values in the array

Evaluate responses using AI:

OFF