SlideShare a Scribd company logo
1 of 12
Part A
Explain why access modifiers are necessary for any class being
defined. Include an example to further your input on this topic.
Part B
1. What can you say about the name of a class?
It must start with an uppercase letter.
The convention is to start with an uppercase letter.
2. What can you say about the name of constructors?
They must be the same name as the class name.
They can be any name, just like other methods.
3. What is a constructor’s return type?
void
Object
The class name
A constructor does not have a return type.
4. It is legal to have more than one constructor in a given
class.
true
false
47. In the main method of the class GradeClient, you have
coded
When you compile, you get the following message:
Explain what the problem is and how to fix it.
48. In the main method of the class GradeClient, you have
coded
When you compile, you get the following message:
Explain what the problem is and how to fix it.
Part C
QUESTION 1
A double is more precise than a float.
True
False
QUESTION 2
char is a valid identifier.
True
False
QUESTION 3
Which one of these is not a primitive data type?
_________________ .
int
double
bool
long
char
QUESTION 4
The two floating point data types are _____ and _____
QUESTION 5
String literals are surrounded by _____ quotes
QUESTION 6
By convention, method names, instance variables and object
names start with a lowercase letter.
True
False
QUESTION 7
When an object reference is first declared, its value is null.
True
False
QUESTION 8
By convention, class names start with a capital letter.
True
False
QUESTION 9
OOP stands for _________________
QUESTION 10
The operations for a class are called _____
QUESTION 11
The special method that we call when instantiating an object is
called a _____
QUESTION 12
API stands for _____
QUESTION 13
An applet is an extension of the JApplet class.
True
False
QUESTION 14
Which package is the Graphics class part of?
_________________ .
javax.swing
java.swing
java.awt
javax.awt
java.graphics
QUESTION 15
Which applet method is called automatically when the applet
needs to redraw itself? _________________ .
init
main
paint
exit
applet
QUESTION 16
What is an applet viewer?
QUESTION 17
Complete the code, changing the color of the Graphics reference
g to a color with red=100, green=200, blue=60
public void paint( Graphics g )
{
// your code goes here
}
QUESTION 18
Complete the code, drawing a line between points (100, 200)
and (34, 67)
public void paint( Graphics g )
{
// your code goes here
}
QUESTION 19
The 4 relational operators, >, >=, <, <= are binary operators.
True
False
QUESTION 20
!( a > 3 ) is equivalent to _________________ .
a < 3
a <= 3
!a < 3
!a <= 3
!( a <= 3 )
QUESTION 21
What is the output of the following code? _________________ .
int age = 30;
if ( age > 33 )
System.out.print( 1 );
else
System.out.print( 2 );
System.out.println( 3 );
1
2
12
123
23
QUESTION 22
When we use a while loop, we always know in advance how
many times the loop body will be executed.
True
False
QUESTION 23
When reading data from a file using a while loop, the typical
condition to exit the loop is when ___________.
We have read the first value in the file
We have read 100 values in the file
We have reached the end of the file
QUESTION 24
Write a loop to output the word EXAM 99 times
QUESTION 25
Write a loop to calculate the total of all the numbers between
100 and 200 included (i.e. 100 + 101 + … + 199 + 200); output
the total.
Part A
Explain why access modifiers are necessary for any class being
defined. Include an
example to further your input on this topic.
Part B
1.
What can you say about the name of a class?
It must start with an uppercase letter.
The convention is to
start with an uppercase letter.
2.
What can you say about the name of constructors?
They must be the same name as the class name.
They can be any name, just like other methods.
3.
What is a constructor’s return type?
void
Object
The class nam
e
A constructor does not have a return type.
4.
It is legal to have more than one constructor in a given class.
true
false
47.
In the
main
method of the class
GradeClient
,
you have coded
When you compile, you get the following message:
Explain what the problem is and how to fix it.
48.
In the
main
method of the class
GradeClient
, you have coded
When you compile, you get the following message:
Part A
Explain why access modifiers are necessary for any class being
defined. Include an
example to further your input on this topic.
Part B
1. What can you say about the name of a class?
It must start with an uppercase letter.
The convention is to start with an uppercase letter.
2. What can you say about the name of constructors?
They must be the same name as the class name.
They can be any name, just like other methods.
3. What is a constructor’s return type?
void
Object
The class name
A constructor does not have a return type.
4. It is legal to have more than one constructor in a given
class.
true
false
47. In the main method of the class GradeClient, you have
coded
When you compile, you get the following message:
Explain what the problem is and how to fix it.
48. In the main method of the class GradeClient, you have
coded
When you compile, you get the following message:
Name:
Date:
An Eater’s Manifesto
Reading over the article made me realize that the way we eat
the food that we eat at the current times is far much different
from the perception of food that was there in the past.
According to the article‚ in the past people used to decide on
what food to eat without the use of the help of any nutrition
expertise and professionals. This was based on the fact that the
question on ‘what food to eat’ was based on the culture of a
given group of people. Since culture is passed from one
generation to the next‚ this implies that what food that was
being eaten by any given cultural group was based on the
culture of that given group. The parents‚ therefore‚ played a
very major role in determining that their children we to eat
when they were born.
This is very interesting to me because it is very surprising that
whatever the different cultures choose to eat as their food
enabled them to live healthy lives. In addition to that‚ I am left
with one very interesting question on how they and decided that
certain foods were going to healthy for them to take. Most
importantly‚ the article points out that culture was the backbone
of what food that was to be eaten‚ how much of the food was to
be eaten‚ the order of eating the food that was being eaten by a
given group of people of a given culture‚ and with what a
specific food was to be eaten and the time on when it was
supposed to be eaten and this was just passed down from one
generation to another by the parents. This left me wondering on
how we currently see nutritionists and other specialists advising
on what food to be eaten and what food not to be eaten in order
to lead and maintain a healthy living.
This question‚ however‚ has been answered by the article in a
very interesting manner. This is because the article points out
that over the past decades the dinner menu has no longer been
under mother’s control‚ but has been taken over by food
marketers and scientists. In addition to that‚ the article points
out that the food that we eat is being controlled by the
government. This is because the government plays a very major
role in setting up the rules and the regulations regarding dietary
guidelines‚ food pyramids‚ and food labeling.
The author of the article points out that what his mother ate
during the 1930s and 1940s while growing up was not the food
that the mother ate while growing up. The food eaten in the
author’s culture was mainly Jewish-American fare‚ which were
mainly the foods that were being eaten by the people that were
of the Eastern Europe and Russian origin. These foods included
cheese blintzes‚ kreplach‚ knishes‚ stuffed cabbage‚ organ
meats‚ chicken liver‚ and several other foods. The author points
out that he never saw these food while growing up unless when
he visited the grandparents who were still eating the food
according to their culture. It is therefore very interesting to
know that the foods that we eat currently are not the food that
our grandparents used to eat and I believe that everyone should
try to search into his/her roots on the food that used to be eaten
by their traditional cultures. It might me interesting.
In conclusion‚ it is true that the food that we currently eat are
not the ones that were eaten by our grandparents based on the
culture as most of the food that we eat are determined by what
the scientists deem to be healthy. I support the scientists and the
government on the foods that they decide that we eat because
unlike the past‚ there are some new diseases that were not there
at the past and the foods that we are advised to eat will enable
us to live healthy lives in the present times.

More Related Content

Similar to Part AExplain why access modifiers are necessary for any class b.docx

Higher Education Essay Topics.pdf
Higher Education Essay Topics.pdfHigher Education Essay Topics.pdf
Higher Education Essay Topics.pdf
Amy Toukonen
 
Running Head RESEARCH QUESTION, THESIS, AND OUTLINE1RESEARCH .docx
Running Head RESEARCH QUESTION, THESIS, AND OUTLINE1RESEARCH .docxRunning Head RESEARCH QUESTION, THESIS, AND OUTLINE1RESEARCH .docx
Running Head RESEARCH QUESTION, THESIS, AND OUTLINE1RESEARCH .docx
todd521
 
Chapter 1 Invitation to Biology Chapter Review Book Title Biol.docx
Chapter 1 Invitation to Biology Chapter Review Book Title Biol.docxChapter 1 Invitation to Biology Chapter Review Book Title Biol.docx
Chapter 1 Invitation to Biology Chapter Review Book Title Biol.docx
keturahhazelhurst
 
The essay topic isManagers encouragement of employee voice can.docx
The essay topic isManagers encouragement of employee voice can.docxThe essay topic isManagers encouragement of employee voice can.docx
The essay topic isManagers encouragement of employee voice can.docx
cherry686017
 
Writing Goals And Objectives and the Perfect Fit
Writing Goals And Objectives and the Perfect FitWriting Goals And Objectives and the Perfect Fit
Writing Goals And Objectives and the Perfect Fit
Maria Lorena Guray
 

Similar to Part AExplain why access modifiers are necessary for any class b.docx (20)

Higher Education Essay Topics.pdf
Higher Education Essay Topics.pdfHigher Education Essay Topics.pdf
Higher Education Essay Topics.pdf
 
PHI 445 Effective Communication - tutorialrank.com
PHI 445 Effective Communication - tutorialrank.comPHI 445 Effective Communication - tutorialrank.com
PHI 445 Effective Communication - tutorialrank.com
 
Soc 101 Effective Communication - tutorialrank.com
Soc 101   Effective Communication - tutorialrank.comSoc 101   Effective Communication - tutorialrank.com
Soc 101 Effective Communication - tutorialrank.com
 
Classification Of Organisms Essay
Classification Of Organisms EssayClassification Of Organisms Essay
Classification Of Organisms Essay
 
Parkland College Admissions Essay
Parkland College Admissions EssayParkland College Admissions Essay
Parkland College Admissions Essay
 
PHI 445 MART Become Exceptional--phi445mart.com
PHI 445 MART Become Exceptional--phi445mart.comPHI 445 MART Become Exceptional--phi445mart.com
PHI 445 MART Become Exceptional--phi445mart.com
 
PHI 445 MART Achievement Education--phi445mart.com
PHI 445 MART Achievement Education--phi445mart.comPHI 445 MART Achievement Education--phi445mart.com
PHI 445 MART Achievement Education--phi445mart.com
 
Phi 445 Effective Communication / snaptutorial.com
Phi 445  Effective Communication / snaptutorial.comPhi 445  Effective Communication / snaptutorial.com
Phi 445 Effective Communication / snaptutorial.com
 
Running Head RESEARCH QUESTION, THESIS, AND OUTLINE1RESEARCH .docx
Running Head RESEARCH QUESTION, THESIS, AND OUTLINE1RESEARCH .docxRunning Head RESEARCH QUESTION, THESIS, AND OUTLINE1RESEARCH .docx
Running Head RESEARCH QUESTION, THESIS, AND OUTLINE1RESEARCH .docx
 
Chapter 1 Invitation to Biology Chapter Review Book Title Biol.docx
Chapter 1 Invitation to Biology Chapter Review Book Title Biol.docxChapter 1 Invitation to Biology Chapter Review Book Title Biol.docx
Chapter 1 Invitation to Biology Chapter Review Book Title Biol.docx
 
The essay topic isManagers encouragement of employee voice can.docx
The essay topic isManagers encouragement of employee voice can.docxThe essay topic isManagers encouragement of employee voice can.docx
The essay topic isManagers encouragement of employee voice can.docx
 
Writing Goals And Objectives and the Perfect Fit
Writing Goals And Objectives and the Perfect FitWriting Goals And Objectives and the Perfect Fit
Writing Goals And Objectives and the Perfect Fit
 
List Of Compare And Contrast Essay Topics.pdf
List Of Compare And Contrast Essay Topics.pdfList Of Compare And Contrast Essay Topics.pdf
List Of Compare And Contrast Essay Topics.pdf
 
PHI 445 NERD Achievement Education--phi445nerd.com
PHI 445 NERD Achievement Education--phi445nerd.comPHI 445 NERD Achievement Education--phi445nerd.com
PHI 445 NERD Achievement Education--phi445nerd.com
 
Quarter 3 Class Obervation Position-Paper.pptx
Quarter 3 Class Obervation Position-Paper.pptxQuarter 3 Class Obervation Position-Paper.pptx
Quarter 3 Class Obervation Position-Paper.pptx
 
PHI 445 NERD Lessons in Excellence / phi445nerd.com
PHI 445 NERD Lessons in Excellence / phi445nerd.comPHI 445 NERD Lessons in Excellence / phi445nerd.com
PHI 445 NERD Lessons in Excellence / phi445nerd.com
 
PHI 445 NERD Education Counseling -- phi445nerd.com
PHI 445 NERD Education Counseling -- phi445nerd.comPHI 445 NERD Education Counseling -- phi445nerd.com
PHI 445 NERD Education Counseling -- phi445nerd.com
 
PHI 445 NERD Become Exceptional--phi445nerd.com
PHI 445 NERD Become Exceptional--phi445nerd.comPHI 445 NERD Become Exceptional--phi445nerd.com
PHI 445 NERD Become Exceptional--phi445nerd.com
 
Printable Writing Paper For Kindergarten - Kin
Printable Writing Paper For Kindergarten - KinPrintable Writing Paper For Kindergarten - Kin
Printable Writing Paper For Kindergarten - Kin
 
PHI 445 Inspiring Innovation / tutorialrank.com
PHI 445 Inspiring Innovation / tutorialrank.comPHI 445 Inspiring Innovation / tutorialrank.com
PHI 445 Inspiring Innovation / tutorialrank.com
 

More from herbertwilson5999

Write a 2 page paper analyzing the fact pattern scenario below. Plea.docx
Write a 2 page paper analyzing the fact pattern scenario below. Plea.docxWrite a 2 page paper analyzing the fact pattern scenario below. Plea.docx
Write a 2 page paper analyzing the fact pattern scenario below. Plea.docx
herbertwilson5999
 
Write a 2 page paper analyzing the fact pattern scenario below. .docx
Write a 2 page paper analyzing the fact pattern scenario below. .docxWrite a 2 page paper analyzing the fact pattern scenario below. .docx
Write a 2 page paper analyzing the fact pattern scenario below. .docx
herbertwilson5999
 
Write at least a three-page analysis using the case study on pages.docx
Write at least a three-page analysis using the case study on pages.docxWrite at least a three-page analysis using the case study on pages.docx
Write at least a three-page analysis using the case study on pages.docx
herbertwilson5999
 
Write an observation essay that explains the unique significance.docx
Write an observation essay that explains the unique significance.docxWrite an observation essay that explains the unique significance.docx
Write an observation essay that explains the unique significance.docx
herbertwilson5999
 

More from herbertwilson5999 (20)

Write a 5-7 page paper describing the historical development of info.docx
Write a 5-7 page paper describing the historical development of info.docxWrite a 5-7 page paper describing the historical development of info.docx
Write a 5-7 page paper describing the historical development of info.docx
 
Write a  5 paragraph essay related to the healthcare fieldthree.docx
Write a  5 paragraph essay related to the healthcare fieldthree.docxWrite a  5 paragraph essay related to the healthcare fieldthree.docx
Write a  5 paragraph essay related to the healthcare fieldthree.docx
 
Write at least a six-page paper, in which youIdentify the.docx
Write at least a six-page paper, in which youIdentify the.docxWrite at least a six-page paper, in which youIdentify the.docx
Write at least a six-page paper, in which youIdentify the.docx
 
Write a 2 page paper analyzing the fact pattern scenario below. Plea.docx
Write a 2 page paper analyzing the fact pattern scenario below. Plea.docxWrite a 2 page paper analyzing the fact pattern scenario below. Plea.docx
Write a 2 page paper analyzing the fact pattern scenario below. Plea.docx
 
Write a 2 page paper analyzing the fact pattern scenario below. .docx
Write a 2 page paper analyzing the fact pattern scenario below. .docxWrite a 2 page paper analyzing the fact pattern scenario below. .docx
Write a 2 page paper analyzing the fact pattern scenario below. .docx
 
Write a 100-word response in Spanish that addresses both of .docx
Write a 100-word response in Spanish that addresses both of .docxWrite a 100-word response in Spanish that addresses both of .docx
Write a 100-word response in Spanish that addresses both of .docx
 
Write a  Request for Proposal (approx. 3 - 4 pages in a word doc.docx
Write a  Request for Proposal (approx. 3 - 4 pages in a word doc.docxWrite a  Request for Proposal (approx. 3 - 4 pages in a word doc.docx
Write a  Request for Proposal (approx. 3 - 4 pages in a word doc.docx
 
Write a  5 paragraph essay related to Physical Therapy Assistant th.docx
Write a  5 paragraph essay related to Physical Therapy Assistant th.docxWrite a  5 paragraph essay related to Physical Therapy Assistant th.docx
Write a  5 paragraph essay related to Physical Therapy Assistant th.docx
 
Write a  5 page paper with  at-least three images that represent.docx
Write a  5 page paper with  at-least three images that represent.docxWrite a  5 page paper with  at-least three images that represent.docx
Write a  5 page paper with  at-least three images that represent.docx
 
Write a  5 paragraph essay related to the healthcare fieldthree maj.docx
Write a  5 paragraph essay related to the healthcare fieldthree maj.docxWrite a  5 paragraph essay related to the healthcare fieldthree maj.docx
Write a  5 paragraph essay related to the healthcare fieldthree maj.docx
 
Write at least Ten sentences on your discussion. Compare and con.docx
Write at least Ten sentences on your discussion. Compare and con.docxWrite at least Ten sentences on your discussion. Compare and con.docx
Write at least Ten sentences on your discussion. Compare and con.docx
 
Write at least a three-page analysis using the case study on pages.docx
Write at least a three-page analysis using the case study on pages.docxWrite at least a three-page analysis using the case study on pages.docx
Write at least a three-page analysis using the case study on pages.docx
 
Write at least a six-page paper, in which you Identify th.docx
Write at least a six-page paper, in which you Identify th.docxWrite at least a six-page paper, in which you Identify th.docx
Write at least a six-page paper, in which you Identify th.docx
 
Write at least a paragraph for each.1) What is your understand.docx
Write at least a paragraph for each.1) What is your understand.docxWrite at least a paragraph for each.1) What is your understand.docx
Write at least a paragraph for each.1) What is your understand.docx
 
Write at least 500 words analyzing a subject you find in this .docx
Write at least 500 words analyzing a subject you find in this .docxWrite at least 500 words analyzing a subject you find in this .docx
Write at least 500 words analyzing a subject you find in this .docx
 
Write at least 750 words paper on Why is vulnerability assessme.docx
Write at least 750 words paper on Why is vulnerability assessme.docxWrite at least 750 words paper on Why is vulnerability assessme.docx
Write at least 750 words paper on Why is vulnerability assessme.docx
 
Write As if You Are Writing in Your Journal (1st Person)Your T.docx
Write As if You Are Writing in Your Journal (1st Person)Your T.docxWrite As if You Are Writing in Your Journal (1st Person)Your T.docx
Write As if You Are Writing in Your Journal (1st Person)Your T.docx
 
Write an original, Scholarly Paper, addressing a topic relevant to t.docx
Write an original, Scholarly Paper, addressing a topic relevant to t.docxWrite an original, Scholarly Paper, addressing a topic relevant to t.docx
Write an original, Scholarly Paper, addressing a topic relevant to t.docx
 
Write an observation essay that explains the unique significance.docx
Write an observation essay that explains the unique significance.docxWrite an observation essay that explains the unique significance.docx
Write an observation essay that explains the unique significance.docx
 
Write an introduction in APA format in about 2 pages to describe.docx
Write an introduction in APA format in about 2 pages to describe.docxWrite an introduction in APA format in about 2 pages to describe.docx
Write an introduction in APA format in about 2 pages to describe.docx
 

Recently uploaded

Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
EADTU
 
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MysoreMuleSoftMeetup
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
CaitlinCummins3
 

Recently uploaded (20)

Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio App
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptx
 
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopal
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 

Part AExplain why access modifiers are necessary for any class b.docx

  • 1. Part A Explain why access modifiers are necessary for any class being defined. Include an example to further your input on this topic. Part B 1. What can you say about the name of a class? It must start with an uppercase letter. The convention is to start with an uppercase letter. 2. What can you say about the name of constructors? They must be the same name as the class name. They can be any name, just like other methods. 3. What is a constructor’s return type? void Object The class name A constructor does not have a return type. 4. It is legal to have more than one constructor in a given class. true false 47. In the main method of the class GradeClient, you have coded When you compile, you get the following message: Explain what the problem is and how to fix it. 48. In the main method of the class GradeClient, you have coded When you compile, you get the following message: Explain what the problem is and how to fix it.
  • 2. Part C QUESTION 1 A double is more precise than a float. True False QUESTION 2 char is a valid identifier. True False QUESTION 3 Which one of these is not a primitive data type? _________________ . int double bool long char QUESTION 4 The two floating point data types are _____ and _____ QUESTION 5 String literals are surrounded by _____ quotes
  • 3. QUESTION 6 By convention, method names, instance variables and object names start with a lowercase letter. True False QUESTION 7 When an object reference is first declared, its value is null. True False QUESTION 8 By convention, class names start with a capital letter. True False QUESTION 9 OOP stands for _________________ QUESTION 10 The operations for a class are called _____ QUESTION 11 The special method that we call when instantiating an object is called a _____ QUESTION 12 API stands for _____ QUESTION 13
  • 4. An applet is an extension of the JApplet class. True False QUESTION 14 Which package is the Graphics class part of? _________________ . javax.swing java.swing java.awt javax.awt java.graphics QUESTION 15 Which applet method is called automatically when the applet needs to redraw itself? _________________ . init main paint
  • 5. exit applet QUESTION 16 What is an applet viewer? QUESTION 17 Complete the code, changing the color of the Graphics reference g to a color with red=100, green=200, blue=60 public void paint( Graphics g ) { // your code goes here } QUESTION 18 Complete the code, drawing a line between points (100, 200) and (34, 67) public void paint( Graphics g ) { // your code goes here } QUESTION 19 The 4 relational operators, >, >=, <, <= are binary operators. True False QUESTION 20 !( a > 3 ) is equivalent to _________________ . a < 3 a <= 3
  • 6. !a < 3 !a <= 3 !( a <= 3 ) QUESTION 21 What is the output of the following code? _________________ . int age = 30; if ( age > 33 ) System.out.print( 1 ); else System.out.print( 2 ); System.out.println( 3 ); 1 2 12 123 23 QUESTION 22 When we use a while loop, we always know in advance how many times the loop body will be executed.
  • 7. True False QUESTION 23 When reading data from a file using a while loop, the typical condition to exit the loop is when ___________. We have read the first value in the file We have read 100 values in the file We have reached the end of the file QUESTION 24 Write a loop to output the word EXAM 99 times QUESTION 25 Write a loop to calculate the total of all the numbers between 100 and 200 included (i.e. 100 + 101 + … + 199 + 200); output the total. Part A Explain why access modifiers are necessary for any class being defined. Include an example to further your input on this topic. Part B 1.
  • 8. What can you say about the name of a class? It must start with an uppercase letter. The convention is to start with an uppercase letter. 2. What can you say about the name of constructors? They must be the same name as the class name. They can be any name, just like other methods. 3. What is a constructor’s return type? void Object The class nam e A constructor does not have a return type. 4. It is legal to have more than one constructor in a given class.
  • 9. true false 47. In the main method of the class GradeClient , you have coded When you compile, you get the following message: Explain what the problem is and how to fix it. 48. In the main method of the class GradeClient , you have coded When you compile, you get the following message: Part A Explain why access modifiers are necessary for any class being
  • 10. defined. Include an example to further your input on this topic. Part B 1. What can you say about the name of a class? It must start with an uppercase letter. The convention is to start with an uppercase letter. 2. What can you say about the name of constructors? They must be the same name as the class name. They can be any name, just like other methods. 3. What is a constructor’s return type? void Object The class name A constructor does not have a return type. 4. It is legal to have more than one constructor in a given class. true false 47. In the main method of the class GradeClient, you have coded When you compile, you get the following message: Explain what the problem is and how to fix it. 48. In the main method of the class GradeClient, you have coded When you compile, you get the following message: Name: Date: An Eater’s Manifesto Reading over the article made me realize that the way we eat the food that we eat at the current times is far much different from the perception of food that was there in the past.
  • 11. According to the article‚ in the past people used to decide on what food to eat without the use of the help of any nutrition expertise and professionals. This was based on the fact that the question on ‘what food to eat’ was based on the culture of a given group of people. Since culture is passed from one generation to the next‚ this implies that what food that was being eaten by any given cultural group was based on the culture of that given group. The parents‚ therefore‚ played a very major role in determining that their children we to eat when they were born. This is very interesting to me because it is very surprising that whatever the different cultures choose to eat as their food enabled them to live healthy lives. In addition to that‚ I am left with one very interesting question on how they and decided that certain foods were going to healthy for them to take. Most importantly‚ the article points out that culture was the backbone of what food that was to be eaten‚ how much of the food was to be eaten‚ the order of eating the food that was being eaten by a given group of people of a given culture‚ and with what a specific food was to be eaten and the time on when it was supposed to be eaten and this was just passed down from one generation to another by the parents. This left me wondering on how we currently see nutritionists and other specialists advising on what food to be eaten and what food not to be eaten in order to lead and maintain a healthy living. This question‚ however‚ has been answered by the article in a very interesting manner. This is because the article points out that over the past decades the dinner menu has no longer been under mother’s control‚ but has been taken over by food marketers and scientists. In addition to that‚ the article points out that the food that we eat is being controlled by the government. This is because the government plays a very major role in setting up the rules and the regulations regarding dietary guidelines‚ food pyramids‚ and food labeling. The author of the article points out that what his mother ate during the 1930s and 1940s while growing up was not the food
  • 12. that the mother ate while growing up. The food eaten in the author’s culture was mainly Jewish-American fare‚ which were mainly the foods that were being eaten by the people that were of the Eastern Europe and Russian origin. These foods included cheese blintzes‚ kreplach‚ knishes‚ stuffed cabbage‚ organ meats‚ chicken liver‚ and several other foods. The author points out that he never saw these food while growing up unless when he visited the grandparents who were still eating the food according to their culture. It is therefore very interesting to know that the foods that we eat currently are not the food that our grandparents used to eat and I believe that everyone should try to search into his/her roots on the food that used to be eaten by their traditional cultures. It might me interesting. In conclusion‚ it is true that the food that we currently eat are not the ones that were eaten by our grandparents based on the culture as most of the food that we eat are determined by what the scientists deem to be healthy. I support the scientists and the government on the foods that they decide that we eat because unlike the past‚ there are some new diseases that were not there at the past and the foods that we are advised to eat will enable us to live healthy lives in the present times.