Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
18 views3 pages

Assignmemt Java

This document outlines an assignment for a JAVA course, detailing true/false questions related to Java programming concepts. It includes a student named Alaa Hawary Mohamed and specifies various programming tasks to be completed, such as creating a student class with specific attributes and methods. The assignment is part of the 2nd term of the 2024/2025 academic year under the supervision of Dr. Mohammed AbdelFattah and assistants.
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 views3 pages

Assignmemt Java

This document outlines an assignment for a JAVA course, detailing true/false questions related to Java programming concepts. It includes a student named Alaa Hawary Mohamed and specifies various programming tasks to be completed, such as creating a student class with specific attributes and methods. The assignment is part of the 2nd term of the 2024/2025 academic year under the supervision of Dr. Mohammed AbdelFattah and assistants.
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/ 3

Information Technology Department

2nd Year
‫والطاقة‬
‫كليةتكنولوجياالصناعة‬
Faculty of Industrial and Energy Technolog

Course: JAVA (1) Lecturer: Dr. Mohammed AbdelFattah


Semester: 2nd term 2024/2025. Assistants: Engs. / Osama El-Samdouni, Hazem Hamdy, Mohamed Ehab, Menna Allah,
Israa Abdel Rasoul, Sarah El-Kharashi, Israa Mohsen

Assignment 2

Student Information
Name: alaa Hawary mohamed

Faculty ID: ………2320112……………… Mark: ………… / 10

Write T (True) or F (False):

Q1. A class may have multiple constructors. ( T)

Q2. Class does not allow constructors overloading. ( F)

Q3. Class does not have any constructor by default. ( F)

Q4. The setter method(s) is used to modify the instance variable(s). ( T)

Q5. The static method can be accessed by creating an object of the class. ( F)

Q6. A constructor in Java is a special method that is used to initialize objects. ( T)

Q7. The instance method can be accessed without creating an object of the class. ( F)

Q8. The constructor name may not match the class name, and it can have a return type. ( F)

Q9. Java enables you to pass a variable number of arguments of the same type to a method. ( T)

Q10. The getter method is used to read the instance variable and is known as the accessor method. ( T)
Information Technology Department
2nd Year
‫والطاقة‬
‫كليةتكنولوجياالصناعة‬
Faculty of Industrial and Energy Technolog

Q11.The static keyword refers that the attribute/method belongs to the class, rather than an object. (T )

Write the following program:

Q13. Develop a student class that contains the following data members (id, name, GPA,

universityName, and universityAddress) and has the following:

- Make these fields (universityName and universityAddress) as a static attribute.

- Create a “No-Args Constructor” that initializes the student information with default values.

- Create a “Parameterized Constructor” that passes initial values for student objects.

- Create getter and setter methods for these data members (id, name, and GPA).

- Create a static method that prints the university information.

- Create an instance method that prints student information.

Page 2 of 2
JAVA
PROGRAMMING
-

You might also like