0% found this document useful (0 votes)
18 views

CSA Unit 1 Lesson 4 Guided Notes

Uploaded by

saanvirao816
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

CSA Unit 1 Lesson 4 Guided Notes

Uploaded by

saanvirao816
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

CSA Unit 1 Guide

Lesson 4: Instantiating Objects


Video Notes: Creating Objects
How is memory in a computer like the land a house is built on?

The memory in a computer is like the land a house is built on as it helps tore source code and other
compiling software that helps overall run the code

What is the relationship between a Painter object and the Painter class?

The Painter class is the “group” in which the singular object “Painter” is stored.

Investigating the Painter


Fill in the missing components to instantiate a Painter object.

Painter alice = new Painter ();

Term Definition Example / Picture / Code

1
CSA Unit 1 Guide

To call the constructor of the class


instantiate that creates an instance/object of the
type of that class

A block of code that initializes


constructor (constructs) the state and value
during object creation

Reflection
Question of the Day: How do I create objects from a class?

You create objects from a class by calling the constructor and assigning a value to it through
the class name (eg. Student saanvi = new Student(); → the constructor goes at the end and
the name of the class and object name goes before the equal sign or assigner).

Now that you know about classes and objects in Java, what type of program are you looking forward to
creating? What objects would you represent in your program?

I am looking forward to creating a mouse and cheese game using classes and objects in Java and my
prior knowledge of coding. Objects such as a mouse, cheese blocks, and wall blocks would be
represented.

You might also like