Java Objects - Real world Scenarios - Practice Quiz
Quiz
•
Computers
•
University
•
Hard
VIKAS BANDARU
Used 1+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Answer explanation
2.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Answer explanation
3.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Answer explanation
4.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Answer explanation
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Timer has field seconds (int). Constructor Timer(int s). Methods: addSeconds(int s) adds to seconds, tick() decreases seconds by 1 if seconds > 0 and returns current seconds. After: Timer t = new Timer(2); t.tick(); t.addSeconds(5); int x = t.tick();
What is x and final seconds?
Answer explanation
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
GeoPoint has x(double), y(double). Constructor GeoPoint(double x,double y). Method move(double dx,double dy) returns new GeoPoint with moved coordinates; translate(double dx,double dy) changes this and returns this. After: GeoPoint p = new GeoPoint(1,1); GeoPoint q = p.move(2,3); p.translate(1,-1);
What are p and q?
Answer explanation
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Message has text(String). Constructor Message(String t). Methods: append(String s) appends and returns this, clear() sets text to empty and returns void, length() returns int length.
After:
Message m = new Message("Hello"); m.append(" ").append("Java");
int n = m.length(); m.clear();
System.out.println(n + " " + m.length());
Answer explanation
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
20 questions
JAVA FOR ANDROID-ANDROID
Quiz
•
University
20 questions
Kuis Pelatihan API Kutim By GIZ
Quiz
•
University - Professi...
20 questions
ETHICAL, LEGAL, AND SOCIAL ISSUES OF INFORMATION TECHNOLOGY
Quiz
•
University
20 questions
DWDM-2
Quiz
•
University
20 questions
PC Safety and Maintenance
Quiz
•
University
15 questions
PROGRAMMING IN PYTHON - UNIT II - TEST 1 MCQS
Quiz
•
University
20 questions
LOOKUP
Quiz
•
9th Grade - University
20 questions
Quiz I - Programming in C
Quiz
•
University
Popular Resources on Wayground
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
4 questions
Activity set 10/24
Lesson
•
6th - 8th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
How to Email your Teacher
Quiz
•
Professional Development
15 questions
Order of Operations
Quiz
•
5th Grade
30 questions
October: Math Fluency: Multiply and Divide
Quiz
•
7th Grade
Discover more resources for Computers
10 questions
Halloween Movies Trivia
Quiz
•
5th Grade - University
7 questions
Central Idea of Informational Text
Interactive video
•
4th Grade - University
7 questions
Review for You: Using Commas
Interactive video
•
4th Grade - University
5 questions
Using Context Clues
Interactive video
•
4th Grade - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
14 questions
Eat Healthy,Be Healty
Quiz
•
4th Grade - University
7 questions
Safari Scholar: Searching for Subject-Verb Agreement
Interactive video
•
4th Grade - University
