0% found this document useful (0 votes)
99 views6 pages

Template For Assessments: Youtube

The document provides a template for assessments with guidelines on formatting questions in tables with fixed row heights and fonts, including specifying the question, options, correct answer, and Blooms level, and examples of formative and summative assessments with multiple choice questions on Java programming concepts such as data types, variables, and classes.

Uploaded by

avni
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)
99 views6 pages

Template For Assessments: Youtube

The document provides a template for assessments with guidelines on formatting questions in tables with fixed row heights and fonts, including specifying the question, options, correct answer, and Blooms level, and examples of formative and summative assessments with multiple choice questions on Java programming concepts such as data types, variables, and classes.

Uploaded by

avni
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/ 6

TEMPLATE FOR ASSESSMENTS

1. Read Guidelines – in case of any doubt check with your mentor.


2. The final submission will have to be in soft copy in MS word as per template shared below.
3. Use Calibri font size 9
4. Keep Questions short and crisp. Word count should not exceed 20 words for questions
and 8 words for options.
5. In the last row – mention the correct option as a) or b)
6. The Blooms level has been fixed – so please design question accordingly.
7. The rows heights have been fixed, so that the table size is not changed. If you have any
problem, use this link to learn how to fix it YouTube
Insert the exact details within the < >
<CO, IF>: <22412>: < Java Programming >: < Basic Syntactical Constructs in Java >: <LO2>: <Assessments>:
<Formative>
<Yogita Jore>
Assessment Type: Formative Assessments: Embedded questions in video

Set 1: Question No 1 Set 1: Question No 2 Set 1: Question No 3

Identify incorrect the java primitive type. There are ____ primitive data types are Identify the valid Boolean declaration.
there in java.
Recall/ Remembering Understanding Application
a) Byte a) 6 a) Boolean b1 = 1;

b) Float b) 7 b) boolean b2 = ‘ wrong ';


c) Character c) 8 c) boolean b3 = false;
d) Long double d) 9 d) Boolean b4 = 'true'
Ans: <Long double > Ans: < 8 > Ans: < boolean b3 = false; >

Set 2: Question No 1 Set 2: Question No 2 Set 2: Question No 3


Identify the place to declare instance The smallest integer type is ______ and Identify the invalid variable name.
variables. its size is_____.
Recall/ Remembering Understanding Application
a) It declares inside the class and outside a) short,8 a) tenthTeam
of method.
b) It declares inside the class with static b) byte,8 b) TenthTeam
prefix and outside of method.
c) It declares inside the method. c) short,16 c) 10thTeam
d) It declares outside the class and d) byte,16 d) _5thTeam
outside of method.
Ans: < It declares inside the class and Ans: < byte,8> Ans: < 10thTeam >
outside of method. >

Set 3: Question No 1 Set 2: Question No 2 Set 2: Question No 3


______are expressions with a fixed value. _______ cannot be used as variable public class TestMain
name in Java programming language ? {
String msg = "Hello World";
public static void main(String[] args)
{
TestMain test = new TestMain();
System.out.println(test.msg);
}
}
Identify the concept of above code.

Recall/ Remembering Understanding Application


a) Constants a) literal a) Instance Variable

b) String b) Keywords b) Class Variable

c) Keyword c) Identifier c) Local Variable


d) Operators d) Identifier and Keywords d) garbage variable

Ans: < Constants > Ans: <Keywords > Ans: < Instance Variable >
Assessment Type: Summative: End of LO: in LMS

Summative: Q 1 Summative: Q 2 Summative: Q 3 Summative: Q 4 Summative: Q 5

Static variables are also As _____ are declared in public class TestMain Initializing a variable at int[ ] age={12,4,5,2,5};
known as _______. a class, these variables { run time is
are created when an static String msg = "Hello called_______. Identify the concept of
object of the class is World"; above declaration.
created and destroyed public static void
when the object is main(String[] args)
destroyed. {
System.out.println(msg);
}
}
Identify the concept of
above code.

Recall/ Remembering Understanding Application Understanding Application

a) garbage variable a) garbage variable a) Instance Variable a) type casting a) class declaration

b) Local Variable b) Local Variable b) Class Variable b) dynamic initialization b) String declaration

c) Instance Variable c) Instance Variable c) Local Variable c) type conversion c) initialize arrays
during declaration

d) Class variables d) Class variables d) garbage variable d) class declaration d) dynamic initialization

Ans: < Class variables> Ans: <Instance Variable > Ans: < Class Variable > Ans: < dynamic Ans: < initialize arrays
initialization > during declaration >

Summative: Q 6
We cannot perform dynamic initialization to the variables declared with ______ keyword.
Understand
a) Final

b) String

c) class
d) interface

Ans: < Final >


Assessment Type: Practice Worksheets: End of LO: in LMS/ downloadable PDF

A. Explain dynamic initialization with example.


Dynamic initialization:
Initialization is the process of providing value to a variable at declaration time. A variable is initialized once in its life
time. Any attempt of setting a variable's value after its declaration is called assignment. To use a local variable, you have
to either initialize or assign it before the variable is first used. But for class members, the compulsion is not so strict. If
you don't initialize them then compiler takes care of the initialization process and set class members to default values.
Java allows its programmers to initialize a variable at run time also. Initializing a variable at run time is called dynamic
initialization. Java allows variables to be initialized dynamically, using any expression valid at the time the variable is
declared.
Example:
public class MainClass 
{
public static void main(String args[]) 
{
double a = 3.0, b = 4.0;
 // c is dynamically initialized
double c = Math.sqrt(a * a + b * b);
System.out.println("Hypotenuse is " + c);
}
}

B. List primitive data types with its size and default value.
Ans:
Data Type Default Value Default size

boolean False/true 1 bit

char '\u0000' 2 byte

byte 0 1 byte

short 0 2 byte

int 0 4 byte

long 0L 8 byte

float 0.0f 4 byte

double 0.0d 8 byte


C. Define constants and state its types. D. Define Token.
Ans: Ans:
Constants in java are fixed values those are not changed
during the Execution of program java supports several types A token is the smallest element of a program that is
of Constants those are: meaningful to the compiler. Simply we can say that java
program is also collection of tokens, comments and
Constant Type of Value Stored
whitespaces.

Integer Literals Literals which stores integer value


A class is defined by a set of declaration statements and
methods containing executable statements. Most statements
contain expressions, which describe the actions carried out
Floating Literals Literals which stores float value on data. The word formed from the character set is building
block of java and are known as token. These tokens
represent the individual entity of language.
Character Literals which stores character value
Literals 
Token Meaning Example
String Literals Literals which stores string value
Keyword A variable is a int distance;
Boolean Literals Literals which stores true or false meaningful name of continue
data storage location break
in computer memory. public
When using a variable return
you refer to memory do
address of computer. while
for

Constant Constants are final int a=20;


expressions with a
fixed value. They are
also called as literals
Syntax: final
data_type
variable_name;

Identifier Identifiers are the MYVARIABLE


names of variables, x
methods, classes, i
packages and _myvariable
interfaces. $myvariable
_9pins
andros
??????

String Sequence of char[] ch={'a','t','


characters. n','y','l','a'};  
String s=new Stri
ng(ch);  

Special Symbols other than [] () {}, ; * =


Symbol the Alphabets and
Digits and white-
spaces.

Operator A symbol that / + == 1 ?


s represents a specific
mathematical or non-
mathematical action.
E. Define variable. Explain types of variable.
Ans:
A variable is a container which holds the value while the Java program is executed. A variable is assigned with a data
type.
Variable is a name of memory location.
Variable is name of reserved area allocated in memory. In other words, it is a name of memory location. It is a
combination of "vary + able" that means its value can be changed.

How to declare variables?


Syntax: datatype var1, var2, var3, ………., varn;

The declaration should be terminated by semicolon (;) whereas all the variable names of same datatype are separated
by commas;

Example:

float simpleInterest; //Declaring float variable


int time = 10, speed = 20; //Declaring and Initializing integer variable
char var = 'h'; // Declaring and Initializing character variable

There are three types of variables in java: local, instance and static.
1) Local Variable
A variable declared inside the body of the method is called local variable. You can use this variable only within that
method and the other methods in the class aren't even aware that the variable exists.
A local variable cannot be defined with "static" keyword.

2) Instance Variable
A variable declared inside the class but outside the body of the method, is called instance variable. It is not declared
as static.
It is called instance variable because its value is instance specific and is not shared among instances.

3) Static variable/ Class variable


A variable which is declared as static is called static variable. It cannot be local. You can create a single copy of static
variable and share among all the instances of the class. Memory allocation for static variable happens only once when
the class is loaded in the memory.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy