Question

Identify the "blueprint" from which individual Java objects are created. java.lang class API method main

          Identify the "blueprint" from which individual Java objects are created.
java.lang
class
API
method
main
        
Identify the "blueprint" from which individual Java objects are created.
java.lang
class
API
method
main

Added by Julie C.

Close

Computer Science and Information Technology
Computer Science and Information Technology
Trishna Knowledge Systems 2018 Edition
AceChat toggle button
Close icon
Ace pointing down

Please give Ace some feedback

Your feedback will help us improve your experience

Thumb up icon Thumb down icon
Thanks for your feedback!
Profile picture
Identify the "blueprint" from which individual Java objects are created. java.lang class API method main Identify the "blueprint" from which individual Java objects are created. java.lang class API method main
Close icon
Play audio
Feedback
Powered by NumerAI
Danielle Fairburn Ivan Kochetkov
Jennifer Stoner verified

Akash M and 50 other subject AP CS educators are ready to help you.

Ask a new question

*

Labs

-

Want to see this concept in action?

NEW

Explore this concept interactively to see how it behaves as you change inputs.

View Labs

*

Key Concepts

-
Key Concept
Premium Feature
Explore the core concept behind this problem.
Play button
Key Concept
Premium Feature
Explore the core concept behind this problem.
Your browser does not support the video tag.

*

Recommended Videos

-
describe-how-you-would-develop-object-oriented-features-of-java-for-the-quiz-program-developed-in-the-programming-assignments-in-particular-describe-how-the-program-could-use-each-of-the-fol-22437

Describe how you would develop object-oriented features of Java for the Quiz program developed in the Programming Assignments. In particular, describe how the program could use each of the following: class variables, instance variables, inheritance, polymorphism, abstract classes, "this", "super", interfaces, and event listeners. Please describe it thoroughly.

Akash M.

language-java-4-composite-pattern-and-building-a-virtual-city-suppose-you-want-to-develop-a-structure-class-for-describing-doorswallsroomsfloors-of-buildingsand-buildings-within-a-citydraw-a-80807

Akash M.

consider-the-following-code-fragment-taken-from-some-package-what-is-the-output-from-calling-the-mai

Consider the following code fragment, taken from some package: What is the output from calling the main() method of the Maryland class?

Data Structures and Algorithms in Java (computer science, physics, engineering, chemistry)


*

Recommended Textbooks

-
Computer Science and Information Technology

Computer Science and Information Technology

Trishna Knowledge Systems 2018 Edition
achievement 1,871 solutions
Introduction to Programming Using Python

Introduction to Programming Using Python

Y. Daniel Liang 1st Edition
achievement 1,804 solutions
Computer Science - An Overview

Computer Science - An Overview

Glenn Brookshear, Dennis Brylow 12th Edition
achievement 1,449 solutions

*

Transcript

-
00:04 We are here to see some concepts and techniques that we can use in java programming for a quiz program.
00:11 So what we want to use are like class variables, instance variables, inheritance, polymorphism, extra classes, this keyword and super keyword.
00:19 All that as an object oriented programming we see the seven things that are used.
00:25 We are seeing all of them right now.
00:26 So first of all we'll see the class variable.
00:30 Now we can also call it as a static variable and it's declared at the class level and are shared among all instances of the class.
00:40 So we can use it using a static keyword and let's see how we can use it in a program.
00:46 For example, supposedly you keep public class and name it as a quiz because you are doing quiz program, creating a class.
01:01 So this is our class variable.
01:06 Commenting helps you have your working and also the person who's reading it.
01:14 Now private static integer and we are just asking about the questions we are having in the quiz.
01:26 So let's see like that.
01:28 So this is how we can create one class variable like this.
01:33 Now the next is the instance variable.
01:36 Now it is declared within a class but outside any method.
01:41 That's what instance variable is for.
01:43 It is declared inside the class but outside any method.
01:47 Okay.
01:49 They belong to each instance of the classes and have their own separate values.
01:53 So let's see how we can use the quiz program with using instance variable.
01:59 Now again we'll create a class known as public.
02:05 Public class quiz.
02:12 Coming to it.
02:15 This is my instance variable now.
02:19 So i'll get it private strings for everything.
02:23 Private string and the quiz name again going with the private list of questions.
02:44 Okay.
02:50 Then again private list of strings as answers.
03:00 Users answers.
03:06 This is how we can do all this too.
03:12 Now let's clear the canvas and go with the third thing.
03:17 That is our inheritance.
03:33 Right.
03:33 Now as we all know what is inheritance.
03:37 It allows us to create a subclass that inherits the properties and behaviors of an existing superclass.
03:44 Okay.
03:44 So now we can use inheritance to create specialized types of quizzes such as multiple choice quizzes or fill in the blanks.
03:52 Which inherits common features and methods from basic quiz class.
03:57 Right.
03:57 So let's see how we can write it.
04:00 It's very simple.
04:02 You can use it as public class multi choice quiz.
04:16 And from where it exchanges it exchange from the quiz class.
04:27 Right.
04:28 Let's go further with the fourth one which is our polymorphism.
04:33 Very integral integral part of our object oriented programming.
04:44 Now what does polymorphism do.
04:46 It allows objects of different classes to be treated as objects of a common superclass.
04:51 Right.
04:52 So what it does it enable us to use a single inherited interface to represent multiple related classes.
05:02 So where we can be using it while handling different types of quizzes where we can use a common quiz interface.
05:14 Right.
05:15 So you can see how it is.
05:19 We talked about it in inheritance event.
05:24 So what i can do is i made a class known as public public interface and quiz.
05:45 Right.
05:46 Void.
05:47 Display.
05:56 Question.
06:03 Again.
06:04 And the void.
06:06 Check.
06:08 Answer.
06:16 This is our.
06:18 Now what we'll do we'll create one class for multiple choice which is public class multiple choice quiz.
06:42 And what to do it implements.
06:47 Right.
06:50 Which class.
06:52 Quiz class.
06:58 This is a first class.
06:59 Again we can have the polymorphism here like public class.
07:05 Fill ups for filling the blank.
07:13 And again it implements quiz.
07:25 This is how we can use polymorphism.
07:28 So here we saw inheritance which is quite very easy to extend quiz to any of the class like multiple choice questions and again to the choice questions.
07:39 But we saw polymorphism implements those two classes.
07:43 Right.
07:44 This is how we see the difference.
07:46 That's again clear canvas and move forward with the abstract class.
08:02 So let's see.
08:06 Fifth one is abstract class.
08:17 Now.
08:17 By the name itself you can see that it's not easy.
08:22 Ok.
08:22 So abstract classes cannot be initiated but can provide a common base for other classes.
08:28 Ok.
08:29 Now they contain what abstract methods obviously...
Need help? Use Ace
Ace is your personal tutor. It breaks down any question with clear steps so you can learn.
Start Using Ace
Ace is your personal tutor for learning
Step-by-step explanations
Instant summaries
Summarize YouTube videos
Understand textbook images or PDFs
Study tools like quizzes and flashcards
Listen to your notes as a podcast
Continue solving this problem
Create a free account to:
  • View full step-by-step solution
  • Ask follow-up questions with Ace AI
  • Save progress and study later
Continue Free
Numerade

Get step-by-step video solution
from top educators

Continue with Clever
or



By creating an account, you agree to the Terms of Service and Privacy Policy
Already have an account? Log In

A free answer
just for you

Watch the video solution with this free unlock.

Numerade

Log in to watch this video
...and 100,000,000 more!


EMAIL

PASSWORD

OR
Continue with Clever