OXUS 20 is pleased to offer PART I of Java Programming Questions and Answers with details explanation to support the educational needs and hoping these series help and benefit Computer Science student, IT professionals and those who eager to learn programming and in particular Java Programming...
Programs are complete in best of my knowledge with zero compilation error in IDE Bloodshed Dev-C++. These can be easily portable to any versions of Visual Studio or Qt. If you need any guidance please let me know via comments and Always Enjoy Programming.
Programs are complete in best of my knowledge with zero compilation error in IDE Bloodshed Dev-C++. These can be easily portable to any versions of Visual Studio or Qt. If you need any guidance please let me know via comments and Always Enjoy Programming.
2009 N Level Revision Structured Essay Question. Please View the SEQ Booklet 1 for self-Revision. This Booklet was created by http://social-studiesresource.blogspot.com/.
Logical reasoning questions and answers is the second priority given field in Competitive exams. Practicing Logiacal reaasoning will consider as the powerful tool to moniter our brain functioning.To answer a Logical reasoning question will need the techniq to identify the logic behind that. The Logical reasoning technique invented and included into competitive exams to save the time to solve perticular academic problems.
http://www.mydearstudent.com/reasoning
Lecture 2 Software Engineering and Design Object Oriented Programming, Design...op205
3F6 Software Engineering and Design, January 2012, lecture slides 2, Object Oriented Programming, Design and Analysis, Dr Elena Punskaya, Cambridge University Engineering Department
Q3 GIVEN THE TREND EQUATION NO OF STUDENTS-3000+200 YEAR BASE: 2003-0
1.INTERPRET EQUATION RESULTS 2.FORECAST FOR 2020 3.WHEN WILL THE NO OF
STUDENTS REACH 6000
Solution
x no of years from 2003 y no of students y = 3000+200x 1) The regression
equation has a positive slope of 200 y intercept is 3000 i.e. no of students in the year 2000
Thus for every year 200 students increase 2) For 2020, x = 17, y = 3000+200(17) = 6400
3) When y =6000, 6000 = 3000+200x or x = 15 Hence in year 2018 students reach 6000
B Regression C D. All the above.
1 Midterm Preview Time allotted 50 minutes CS 11.docxhoney725342
1
Midterm Preview
Time allotted: 50 minutes
CS 110, Programming Fundamentals I
Central Washington University
Computer Science
Instructions
There are five sections on this exam that contain 24 required questions, a sixth section that contains extra
credit questions, and a last, seventh section, with supplementary information that may be helpful in answering
some of the required questions. This midterm is worth 100 points. Each question in a section is worth the points
indicated at the beginning of the section.
• Pace yourself
• Do not spend too much time on any one question
• Partial credit will be given, if warranted
• Partial credit will NOT be given on the extra credit questions, and points will NOT be taken off for
incorrectly answering an extra credit question
This exam is a closed book, closed notes, no IPhones, no Internet, etc. exam. All that you need is a pen or
pencil.
Name (Print)
Honor Code Statement: I pledge that this submission is solely my work, and that I have neither
given to, nor received help from anyone.
Signature:
Section Question Type Question Numbers Points Possible Points Scored
I True / False 1-10 20
II Multiple Choice 11-15 20
III Find the Error 16 20
IV Short Answer 17-22 30
V One or More Answers 23-24 10
Total 100
VI Extra Credit
Total Including Extra Credit
2
Section I: True/False Each question is worth 2 points; no partial credit given
Circle either True or False.
1. True / False The following is a syntactically correct variable declaration and assignment
statement:
double int = 2.0;
2.
True / False
The diagram in Figure 1a is the decision structure logic of the Java statements in
Figure 1b.
if (Condition_1){
if (Condition_2){
Statement_B;
}else{
Statement_C;
}
}
if (! Condition_1){
Statement_A;
}
Figure 1a Figure 1b
3. True / False Java is a case sensitive programming language.
4. True / False Assuming that letter has been declared as a variable of type char, the below
statement is syntactically correct:
letter = “a”;
5. True / False For the logical AND operator, &&, which connects two boolean expressions, both
expressions must be false for the overall expression to be false.
6. True / False The below two pieces of code output the same thing to the console:
int someVariable = 0;
System.out.println(“Output : “ + someVariable);
int someVar1 = 1, someVar2 = 2;
System.out.println(“Output : “ + someVar1 / someVar2);
7. True / False Syntax errors are mistakes that the programmer has made that violate the rules of the
programming language.
3
8. True / False The following Java code is syntactically incorrect:
Scanner keyBoard = new Scanner(System.in);
int someValue = keyBoard.nextInt();
switch (someValue){
case 1:
case 2:
case 3:
System.out.println("Input is 1 or 2 or 3.");
break;
default:
Syst ...
Exam
Name___________________________________
MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.
1) Analyze the following program fragment:
int x;
double d = 1.5;
switch (d) {
case 1.0: x = 1;
case 1.5: x = 2;
case 2.0: x = 3;
}
1)
A) The switch control variable cannot be double.
B) The program has a compile error because the required break statement is missing in the
switch statement.
C) The program has a compile error because the required default case is missing in the switch
statement.
D) No errors.
2) Analyze the following code:
boolean even = false;
if (even = true) {
System.out.println("It is even!");
}
2)
A) The program runs fine, but displays nothing.
B) The program runs fine and displays It is even!.
C) The program has a runtime error.
D) The program has a compile error.
3) What is the printout of the following switch statement?
char ch = 'a';
switch (ch) {
case 'a':
case 'A':
System.out.print(ch); break;
case 'b':
case 'B':
System.out.print(ch); break;
case 'c':
case 'C':
System.out.print(ch); break;
case 'd':
case 'D':
System.out.print(ch);
}
3)
A) abc B) abcd C) ab D) aa E) a
1
4) The order of the precedence (from high to low) of the operators +, *, &&, ||, & is: 4)
A) *, +, &, &&, ||
B) *, +, &&, ||, &
C) &&, ||, &, *, +
D) &, ||, &&, *, +
E) *, +, &, ||, &&
5) The statement System.out.printf("%10s", 123456) outputs ________. (Note: * represents a space) 5)
A) ****123456 B) 12345***** C) 123456**** D) 23456*****
6) The following code displays ________.
double temperature = 50;
if (temperature >= 100)
System.out.println("too hot");
else if (temperature <= 40)
System.out.println("too cold");
else
System.out.println("just right");
6)
A) too cold B) too hot
C) too hot too cold just right D) just right
7) Which of the following code displays the area of a circle if the radius is positive? 7)
A) if (radius >= 0) System.out.println(radius * radius * 3.14159);
B) if (radius != 0) System.out.println(radius * radius * 3.14159);
C) if (radius > 0) System.out.println(radius * radius * 3.14159);
D) if (radius <= 0) System.out.println(radius * radius * 3.14159);
8) ________ is the code with natural language mixed with Java code. 8)
A) A flowchart diagram B) Java program
C) Pseudocode D) A Java statement
9) Analyze the following code:
if (x < 100) && (x > 10)
System.out.println("x is between 10 and 100");
9)
A) The statement compiles fine.
B) The statement has compile errors because (x<100) & (x > 10) must be enclosed inside
parentheses and the println(…) statement must be put inside a block.
C) The statement compiles fine, but has a runtime error.
D) The statement has compile errors because (x<100) & (x > 10) must be enclosed inside
parentheses.
10) In Java, the word true is ________. 10)
A) same as value 1 B) same as value 0
C) a Boolean literal D) a Java keyword
2
11) How many time ...
Oracle Certified Associate (OCA) Java SE 8 Programmer II (1Z0-809) - Practice...Udayan Khattry
Assess your preparation with these Practice Test Questions with Explanation. Questions are Extracted from Highest Rated Course on Udemy which has helped a lot of students to pass the exam with good score.
500+ multiple choice questions with explanation to assess Oracle Certified Associate, Java SE 8 Programmer II preparation.
Highest Rated course on UDEMY
Read the students success stories at:
https://udayankhattry.com/ocp/
Enroll now to receive maximum discount on the course ie. for just $9.99 or ₹640.00, click the link below- https://www.udemy.com/java-ocp/?couponCode=UDAYANKHATTRY.COM
To avail maximum discount on all courses visit: www.udayankhattry.com
2009 N Level Revision Structured Essay Question. Please View the SEQ Booklet 1 for self-Revision. This Booklet was created by http://social-studiesresource.blogspot.com/.
Logical reasoning questions and answers is the second priority given field in Competitive exams. Practicing Logiacal reaasoning will consider as the powerful tool to moniter our brain functioning.To answer a Logical reasoning question will need the techniq to identify the logic behind that. The Logical reasoning technique invented and included into competitive exams to save the time to solve perticular academic problems.
http://www.mydearstudent.com/reasoning
Lecture 2 Software Engineering and Design Object Oriented Programming, Design...op205
3F6 Software Engineering and Design, January 2012, lecture slides 2, Object Oriented Programming, Design and Analysis, Dr Elena Punskaya, Cambridge University Engineering Department
Q3 GIVEN THE TREND EQUATION NO OF STUDENTS-3000+200 YEAR BASE: 2003-0
1.INTERPRET EQUATION RESULTS 2.FORECAST FOR 2020 3.WHEN WILL THE NO OF
STUDENTS REACH 6000
Solution
x no of years from 2003 y no of students y = 3000+200x 1) The regression
equation has a positive slope of 200 y intercept is 3000 i.e. no of students in the year 2000
Thus for every year 200 students increase 2) For 2020, x = 17, y = 3000+200(17) = 6400
3) When y =6000, 6000 = 3000+200x or x = 15 Hence in year 2018 students reach 6000
B Regression C D. All the above.
1 Midterm Preview Time allotted 50 minutes CS 11.docxhoney725342
1
Midterm Preview
Time allotted: 50 minutes
CS 110, Programming Fundamentals I
Central Washington University
Computer Science
Instructions
There are five sections on this exam that contain 24 required questions, a sixth section that contains extra
credit questions, and a last, seventh section, with supplementary information that may be helpful in answering
some of the required questions. This midterm is worth 100 points. Each question in a section is worth the points
indicated at the beginning of the section.
• Pace yourself
• Do not spend too much time on any one question
• Partial credit will be given, if warranted
• Partial credit will NOT be given on the extra credit questions, and points will NOT be taken off for
incorrectly answering an extra credit question
This exam is a closed book, closed notes, no IPhones, no Internet, etc. exam. All that you need is a pen or
pencil.
Name (Print)
Honor Code Statement: I pledge that this submission is solely my work, and that I have neither
given to, nor received help from anyone.
Signature:
Section Question Type Question Numbers Points Possible Points Scored
I True / False 1-10 20
II Multiple Choice 11-15 20
III Find the Error 16 20
IV Short Answer 17-22 30
V One or More Answers 23-24 10
Total 100
VI Extra Credit
Total Including Extra Credit
2
Section I: True/False Each question is worth 2 points; no partial credit given
Circle either True or False.
1. True / False The following is a syntactically correct variable declaration and assignment
statement:
double int = 2.0;
2.
True / False
The diagram in Figure 1a is the decision structure logic of the Java statements in
Figure 1b.
if (Condition_1){
if (Condition_2){
Statement_B;
}else{
Statement_C;
}
}
if (! Condition_1){
Statement_A;
}
Figure 1a Figure 1b
3. True / False Java is a case sensitive programming language.
4. True / False Assuming that letter has been declared as a variable of type char, the below
statement is syntactically correct:
letter = “a”;
5. True / False For the logical AND operator, &&, which connects two boolean expressions, both
expressions must be false for the overall expression to be false.
6. True / False The below two pieces of code output the same thing to the console:
int someVariable = 0;
System.out.println(“Output : “ + someVariable);
int someVar1 = 1, someVar2 = 2;
System.out.println(“Output : “ + someVar1 / someVar2);
7. True / False Syntax errors are mistakes that the programmer has made that violate the rules of the
programming language.
3
8. True / False The following Java code is syntactically incorrect:
Scanner keyBoard = new Scanner(System.in);
int someValue = keyBoard.nextInt();
switch (someValue){
case 1:
case 2:
case 3:
System.out.println("Input is 1 or 2 or 3.");
break;
default:
Syst ...
Exam
Name___________________________________
MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.
1) Analyze the following program fragment:
int x;
double d = 1.5;
switch (d) {
case 1.0: x = 1;
case 1.5: x = 2;
case 2.0: x = 3;
}
1)
A) The switch control variable cannot be double.
B) The program has a compile error because the required break statement is missing in the
switch statement.
C) The program has a compile error because the required default case is missing in the switch
statement.
D) No errors.
2) Analyze the following code:
boolean even = false;
if (even = true) {
System.out.println("It is even!");
}
2)
A) The program runs fine, but displays nothing.
B) The program runs fine and displays It is even!.
C) The program has a runtime error.
D) The program has a compile error.
3) What is the printout of the following switch statement?
char ch = 'a';
switch (ch) {
case 'a':
case 'A':
System.out.print(ch); break;
case 'b':
case 'B':
System.out.print(ch); break;
case 'c':
case 'C':
System.out.print(ch); break;
case 'd':
case 'D':
System.out.print(ch);
}
3)
A) abc B) abcd C) ab D) aa E) a
1
4) The order of the precedence (from high to low) of the operators +, *, &&, ||, & is: 4)
A) *, +, &, &&, ||
B) *, +, &&, ||, &
C) &&, ||, &, *, +
D) &, ||, &&, *, +
E) *, +, &, ||, &&
5) The statement System.out.printf("%10s", 123456) outputs ________. (Note: * represents a space) 5)
A) ****123456 B) 12345***** C) 123456**** D) 23456*****
6) The following code displays ________.
double temperature = 50;
if (temperature >= 100)
System.out.println("too hot");
else if (temperature <= 40)
System.out.println("too cold");
else
System.out.println("just right");
6)
A) too cold B) too hot
C) too hot too cold just right D) just right
7) Which of the following code displays the area of a circle if the radius is positive? 7)
A) if (radius >= 0) System.out.println(radius * radius * 3.14159);
B) if (radius != 0) System.out.println(radius * radius * 3.14159);
C) if (radius > 0) System.out.println(radius * radius * 3.14159);
D) if (radius <= 0) System.out.println(radius * radius * 3.14159);
8) ________ is the code with natural language mixed with Java code. 8)
A) A flowchart diagram B) Java program
C) Pseudocode D) A Java statement
9) Analyze the following code:
if (x < 100) && (x > 10)
System.out.println("x is between 10 and 100");
9)
A) The statement compiles fine.
B) The statement has compile errors because (x<100) & (x > 10) must be enclosed inside
parentheses and the println(…) statement must be put inside a block.
C) The statement compiles fine, but has a runtime error.
D) The statement has compile errors because (x<100) & (x > 10) must be enclosed inside
parentheses.
10) In Java, the word true is ________. 10)
A) same as value 1 B) same as value 0
C) a Boolean literal D) a Java keyword
2
11) How many time ...
Oracle Certified Associate (OCA) Java SE 8 Programmer II (1Z0-809) - Practice...Udayan Khattry
Assess your preparation with these Practice Test Questions with Explanation. Questions are Extracted from Highest Rated Course on Udemy which has helped a lot of students to pass the exam with good score.
500+ multiple choice questions with explanation to assess Oracle Certified Associate, Java SE 8 Programmer II preparation.
Highest Rated course on UDEMY
Read the students success stories at:
https://udayankhattry.com/ocp/
Enroll now to receive maximum discount on the course ie. for just $9.99 or ₹640.00, click the link below- https://www.udemy.com/java-ocp/?couponCode=UDAYANKHATTRY.COM
To avail maximum discount on all courses visit: www.udayankhattry.com
In this lesson you will learn how to use basic syntax, conditions, if-else statements and loops (for-loop, while-loop and do-while-loop) in Java and how to use the debugger.
Watch the video lesson and access the hands-on exercises here: https://softuni.org/code-lessons/java-foundations-certification-basic-syntax-conditions-and-loops
Data is the Fuel of Organizations: Opportunities and Challenges in AfghanistanAbdul Rahman Sherzad
A car without fuel cannot be driven; a mobile, a laptop or a PC without power cannot be used; a website without feeding won't have any visitors; likewise, an organization without data will not stand and cannot be survived.
The data quickly becoming one of the most important resources for any country, company, or organizations. It is the data that enables organizations to explain the past and guess the future through data science and business intelligence tools.
This presentation demonstrates how the Kankor data can be used as a resource in the context of Afghanistan, particularly, the candidates’ names that organizations in Afghanistan do not use for anything.
Read the following paper for more information and examples:
https://www.researchgate.net/publication/322695084_Data_is_the_Fuel_of_Organizations_Opportunities_and_Challenges_in_Afghanistan
These useful functions/snippets enable you to validate Unicode characters such as Digits, Person names, and Text mainly used in Afghanistan and Iran.
Feature list:
* Validate Person names commonly used in Afghanistan and Iran. Person names may be in Persian/Dari, Arabic, and English and similar languages;
* Validate only Persian Text;
* Validate only Pashtu Text;
* Validate digit in Persian/Dari, Pashtu and Arabic format;
* Validate digit in all common formats.
This presentation explains and solves problems such as Factorial, Fibonacci, Greatest Common Divisor, Binary Search, and Traversing Directory and Sub-Directories in both recursion and iteration.
In summary, there are similarities between recursion and iteration. Hence, any problems that can be solved with iterations can be solved with recursions and vice versa.
In SQL, the ORDER BY keyword is used to sort the result-set in ascending (ASC) or descending (DESC) order by some specified column/columns.
It works great for most of the cases. However, for alphanumeric data, it may not return the result-set that you will be expecting.
This presentation explains how this can be addressed using different techniques.
In PHP, variable variables take the value of one variable, and treat that as the name of another variable.
Variable variables are just variables whose names can be programmatically set and accessed. Hence, they are also called dynamic variable names.
Cross joins are used to return every combination of rows from two and more than two tables. Cross Joins are sometimes called a Cartesian product. This presentation illustrates cross join examples and applications in real life.
Applicability of Educational Data Mining in Afghanistan: Opportunities and Ch...Abdul Rahman Sherzad
The increase in enrollment in education and higher education institutions, the increase in the use of the Internet as well as the emergence of technology in educational systems have led to the aggregation of large amounts of student data at educational institutions (schools, colleges, and universities), which makes it vital to use data mining methods to improve the educational settings.
Although educational institutions collect an enormous amount of student data, this data is utilized to produce basic insights and is not used for decisions to improve the educational settings.
To get essential benefits from the data, powerful techniques are required to extract the useful knowledge which is valuable and significant for the decision and policy makers.
Secure web programming plus end users' awareness are the last line of defense against attacks targeted at the corporate systems, particularly web applications, in the era of world-wide web.
Most web application attacks occur through Cross Site Scripting (XSS), and SQL Injection. On the other hand, most web application vulnerabilities arise from weak coding with failure to properly validate users' input, and failure to properly sanitize output while displaying the data to the visitors.
The literature also confirms the following web application weaknesses in 2010: 26% improper output handling, 22% improper input handling, and 15% insufficient authentication, and others.
Abdul Rahman Sherzad, lecturer at Computer Science Faculty of Herat University, and Ph.D. student at Technical University of Berlin gave a presentation at 12th IT conference on Higher Education for Afghanistan in MoHE, and then conducted a seminar at Hariwa Institute of Higher Education in Herat, Afghanistan introducing web application security threats by demonstrating the security problems that exist in corporate systems with a strong emphasis on secure development. Major security vulnerabilities, secure design and coding best practices when designing and developing web-based applications were covered.
The main objective of the presentation was raising awareness about the problems that might occur in web-application systems, as well as secure coding practices and principles. The presentation's aims were to build security awareness for web applications, to discuss the threat landscape and the controls users should use during the software development lifecycle, to introduce attack methods, to discuss approaches for discovering security vulnerabilities, and finally to discuss the basics of secure web development techniques and principles.
Database Automation with MySQL Triggers and Event SchedulersAbdul Rahman Sherzad
This advanced training seminar on "Database Automation using MySQL Triggers and Event Schedulers" is dedicated to the Computer Science graduates and students of both public and private universities.
In this seminar we are going to look in depth at MySQL Triggers and Event Schedulers– powerful features supported by most popular commercial and open source relational database systems.
The Triggers are powerful tools for protecting the integrity of the data in the databases, logging and auditing of the changes on data, business logic, perform calculations, run further SQL commands, etc.
The Events are very useful to automate some database operations such as optimizing database tables, cleaning up logs, archiving data, or generate complex reports during off-peak time, etc.
The participants will learn about the true concept, implementation and application of MySQL Triggers and Event Schedulers with real life examples and scenarios.
They will also learn how to use the database triggers and event schedulers in many real cases to automate database tasks - such as optimizing database tables, cleaning up logs, archiving data, or generate complex reports during off-peak time.
This seminar is presented by Abdul Rahman Sherzad lecturer at Computer Science faculty of Herat University, and PhD Student at Technical University of Berlin, Germany at Hariwa Institute of Higher Education, Herat, Afghanistan.
Education is one of the main pillars and key concerns for each society in general. In developing countries, in particular in Afghanistan, we observe a remarkable increase in enrollment in education and higher education institutions, but most of the students don't have proper access to their scores. For instance, while Kankor result is announced the vast amounts of traffic the visitors generate make the website completely down and inaccessible. Another example, There is no efficient method to access the university scores in particular for students from other provinces. Last but not least, Diploma and certification verification is a lengthy and complicated process, when graduated students apply for jobs and scholarships inside or outside of Afghanistan they are asked to provide their certificate and diploma. One of the solutions can be verification of the graduation documents through SMS.
In Herat Innovation Lab 2015, Education group members under the mentorship of Abdul Rahman Sherzad chose this social and educational domain problem and within three days they designed and developed a prototype solution that enable students to access i.e. Kankor Scores Result, University Scores Result, Faculties Announcements and Events, and Certificate/Diploma Verification via SMS, Mobile and Web Applications effectively and efficiently.
Innovation Labs (iLabs) is a social innovation program covering a series of conferences. One the one hand, the goal is to bring social and technology experts together for the networking purpose. On the other hand, the motivation is to harness technology to solve the most challenging social and environmental problems and to build tech-based systems.
This presentation looks into the existing web structure and services of all Afghan universities, not only to evaluate the entire infrastructure but also to systematically analyze the gaps and design challenges of web platforms and services as a means of communication and collaboration among various stakeholders including the Ministry of Higher Education, its subsidiaries, students and other related audience.
The presentation finds that the environment for necessary ICT infrastructure and services is up to the expected required standard to provide access to various online resources and systems. The next important finding is the increasing demand by students to access information online rather than the existing traditional paper-based systems. Another very important finding is related to the non-existence of a formal managerial oversight to all the online resources and thus has resulted to a very poor quality of content, outdated information and the services that don't meet the expected needs and challenges.
PHP Basic and Fundamental Questions and Answers with Detail ExplanationAbdul Rahman Sherzad
These PHP basic and fundamental questions and answers with detail explanation help students and learners to think comprehensive, and to seek more to understand the concept and the root of each topic concretely.
This presentation introduces Java Applet and Java Graphics in detail with examples and finally using the concept of both applet and graphics code the analog clock project to depict how to use them in real life challenges and applications.
Fundamentals of Database Systems questions and answers with explanation for fresher's and experienced for interview, competitive examination and entrance test.
Today, we continue our journey into the world of RDBMS (relational database management systems) and SQL (Structured Query Language).
In this presentation, you will understand about some key definitions and then you will learn how to work with multiple tables that have relationships with each other.
First, we will go covering some core concepts and key definitions, and then will begin working with JOINs queries in SQL.
This presentation guide you how to make a custom Splash Screen step by step using Java Programming. In addition, you will learn the concept and usage of Java Timer, Java Progress Bar and Window ...
This presentation explains step by step how to develop and code Fal-e Hafez (Omens of Hafez) Cards in Persian Using JAVA. There are several applications which are coded by different programming languages i.e. Java languages for Desktops and Mobiles, HTML and CSS and PHP for Web Pages, etc. and this shows the importance of Omens of Hafez among the Persian people.
This presentation is an introduction to the design, creation, and maintenance of web design and development life cycle and web technologies. With it, you will learn about the web technologies, the life cycle of developing an efficient website and web application and finally some web essentials questions will be provided and reviewed.
Java Virtual Keyboard Using Robot, Toolkit and JToggleButton ClassesAbdul Rahman Sherzad
A Virtual Keyboard is considered to be a component to use on computers without a real keyboard e.g. Touch Screen Computers and Smart Phones; where a mouse can utilize the keyboard functionalities and features.
In addition, Virtual Keyboard used for the following subjects: Foreign Character Sets, Touchscreen, Bypass Key Loggers, etc.
The Indian economy is classified into different sectors to simplify the analysis and understanding of economic activities. For Class 10, it's essential to grasp the sectors of the Indian economy, understand their characteristics, and recognize their importance. This guide will provide detailed notes on the Sectors of the Indian Economy Class 10, using specific long-tail keywords to enhance comprehension.
For more information, visit-www.vavaclasses.com
This is a presentation by Dada Robert in a Your Skill Boost masterclass organised by the Excellence Foundation for South Sudan (EFSS) on Saturday, the 25th and Sunday, the 26th of May 2024.
He discussed the concept of quality improvement, emphasizing its applicability to various aspects of life, including personal, project, and program improvements. He defined quality as doing the right thing at the right time in the right way to achieve the best possible results and discussed the concept of the "gap" between what we know and what we do, and how this gap represents the areas we need to improve. He explained the scientific approach to quality improvement, which involves systematic performance analysis, testing and learning, and implementing change ideas. He also highlighted the importance of client focus and a team approach to quality improvement.
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
Ethnobotany and Ethnopharmacology:
Ethnobotany in herbal drug evaluation,
Impact of Ethnobotany in traditional medicine,
New development in herbals,
Bio-prospecting tools for drug discovery,
Role of Ethnopharmacology in drug evaluation,
Reverse Pharmacology.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
This presentation provides a briefing on how to upload submissions and documents in Google Classroom. It was prepared as part of an orientation for new Sainik School in-service teacher trainees. As a training officer, my goal is to ensure that you are comfortable and proficient with this essential tool for managing assignments and fostering student engagement.
OXUS20 JAVA Programming Questions and Answers PART I
1. https://www.facebook. com/Oxus20
PART I – Single and Multiple choices, True/False and Blanks:
1) ............. If I have a variable that is a constant, then I must define the
variable name with capital letters.
True
False
False -
Because you don't have to define
the constant variable name with CAPITAL;
but it is recommended.
2) If you forget to put a closing quotation mark on a string, what kind error will be
raised?
A compilation error
A runtime error
A logic error
3) ............. What is the size of a char?
4 bits
8 bits
7 bits
16 bits
16 bits
- Because the char data type is a single
16-bit Unicode character. It has a minimum value
of 'u0000' (or 0) and a maximum value
of 'uFFFF' (or 65,535 inclusive).
4) If a program compiles fine, but it produces incorrect result, then the program
suffers __________.
A compilation error
A logic error -
A runtime error
Because the program compiles fine,
also there is no Runtime Error because the program
does not crush.
A logic error
5) Which of the following are the reserved words?
public
static
void
class
Abdul Rahman Sherzad
All of them are Reserved Words (Key
Words) in JAVA.
Page 1 of 11
2. https://www.facebook. com/Oxus20
6) ............. The operator, +, may be used to concatenate strings together as well
as add two numeric quantities together.
True
False
True - Because:
String full_name = "Abdul Rahman " + "Sherzad";
int sum = 2 + 3;
7) Analyze the following code.
public class Test {
public static void main(String[] args) {
System.out.println(myMethod(2));
}
public static int myMethod(int num) {
return num;
}
public static void myMethod(int num) {
System.out.println(num);
}
}
The program has a compile error because the two methods myMethod have the same signature.
The program has a compile error because the second myMethod method is defined, but not invoked in the main method.
The program runs and prints 2 once.
The program runs and prints 2 twice.
The method name and parameter list are part of method
signature. Declaration of two methods with same
signature is not possible because The Java compiler
is able to distinguish the difference between the
methods through their method signatures.
8) Math.pow(4, 1 / 2) returns __________.
2
2.0
0
0.0
1
1.0
1.O – Because:
1 / 2 = 0 due to the INTEGER Division
Math.pow(4, 0) = 1.0 since every number to the
power is 1; on the other hand the pow() method
returns double thus 1 becomes 1.0
Abdul Rahman Sherzad
Page 2 of 11
3. https://www.facebook. com/Oxus20
9) Which of the following is a valid identifier?
$343
class
9X
8+9
radius
_999
All variable names must begin with a letter
of the alphabet, an underscore ( _ ), or a
dollar sign ($).
You cannot use a java keyword (reserved
word) for a variable name.
10) Which of the following is a constant, according to Java naming conventions?
MAX_VALUE
Test
read
ReadInt
Use ALL_UPPER_CASE for your named constants,
COUNT
Variable_Name
separating words with the underscore character.
For example, use TAX_RATE rather
than taxRate or TAXRATE.
11) Analyze the following code:
Code 1:
int number = 45;
boolean even;
if (number % 2 == 0)
even = true;
else
even = false;
Code 2:
boolean even = (number % 2 == 0);
Code 1 has compile errors.
Code 2 has compile errors.
Both Code 1 and Code 2 have compile errors.
Both Code 1 and Code 2 are correct, but Code 2 is better.
boolean even = (number % 2 == 0);
The above expression interprets as if the
number is completely divisible by 2 even will
be set to true else even will be set to false.
Abdul Rahman Sherzad
Page 3 of 11
4. https://www.facebook. com/Oxus20
12) What is the exact output of the following code?
double area = 3.5;
System.out.print("area");
System.out.print(area);
3.53.5
3.5 3.5
area3.5
area 3.5
System.out.print("area"); // the word area will be printed
as it appears between "" with cursor on same line.
System.out.println(area); // the word area will be
interpreted as 3.5 this time because it does not appear
between "".
13) How many times will the following code print "Welcome to OXUS 20"?
int count = 0;
while (count++ < 10) {
System.out.println("Welcome to OXUS 20");
}
8
9
10
11
The above code can be written as follow:
int count = 0;
while (count < 10) {
System.out.println("Welcome to OXUS 20");
count++;
}
The loop start from 0 (0 is inclusive) and continues
until 10 (10 is not included)
Interval demonstration [0, 10)
14) What is the result of -7 % 5 is _____?
2
0
-2
-7
Abdul Rahman Sherzad
JAVA language developers decided to choose the sign of the
result equals the sign of the dividend in modulus
expression. Thus, in expression -7 % 5 the dividend is -7,
so result of modulus will be evaluated to -2.
Page 4 of 11
5. https://www.facebook. com/Oxus20
15) You should fill in the blank in the following code with ______________.
public class Test {
public static void main(String[] args) {
System.out.print("The grade is ");
printGrade(78.5);
System.out.print("The grade is ");
printGrade(59.5);
}
public static __________ printGrade(double score) {
if (score >= 90.0) {
System.out.println('A');
} else if (score >= 80.0) {
System.out.println('B');
} else if (score >= 70.0) {
System.out.println('C');
} else if (score >= 60.0) {
System.out.println('D');
} else {
System.out.println('F');
}
}
}
int
double
boolean
char
void
String
void
is the correct answer because the
printGrade() method does not return anything; it
simply prints the result.
16) The following code fragment reads in two numbers:
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int i = input.nextInt();
double d = input.nextDouble();
}
What are the correct ways to enter these two numbers?
Enter an integer, a space, a double value, and then the Enter key.
Enter an integer, two spaces, a double value, and then the Enter key.
Enter an integer, an Enter key, a double value, and then the Enter key.
Enter a numeric value with a decimal point, a space, an integer, and then the Enter key.
Abdul Rahman Sherzad
Page 5 of 11
6. https://www.facebook. com/Oxus20
PART II – Write output of the followings programs:
1. What output is produced by the following program?
public class Test {
public static void main(String[] args) {
int limit = 100, num1 = 10, num2 = 20;
if (limit <= limit) {
if (num1 == num2)
System.out.println("Tricky Question");
System.out.println("OXUS 20");
}
System.out.println("OXUS means (Amu Darya)");
}
}
OXUS 20
OXUS means (Amu Darya)
Following is the correct indentation and syntax of above program:
public class Test {
public static void main(String[] args) {
int limit = 100, num1 = 10, num2 = 20;
if (limit <= limit) {
if (num1 == num2) {
System.out.println("Tricky Question");
}
System.out.println("OXUS 20");
}
System.out.println("OXUS means (Amu Darya)");
}
}
2. What output is produced by the following program?
public class Test {
public static void main(String[] args) {
char c1 = 'A';
char c2 = 'B';
System.out.println(c1 + c2);
}
}
131
Why the output is 131? Because:
'B' = 66
Abdul Rahman Sherzad
'A' = 65
'A' + 'B' => 65 + 66 = 131
Page 6 of 11
7. https://www.facebook. com/Oxus20
1. What output is produced by the following program?
public class Test {
public static void main(String[] args) {
char c1 = 'A';
char c2 = 'B';
System.out.println("" + c1 + c2);
}
}
Why the output is AB? Because java calculates the expression from
AB
left to right as follow:
"" + c1 = "A"
"A" + c2 = "AB" // String plus char will be converted to String
Thus output will be AB
// String plus char will be converted to String
1. What output is produced by the following program?
public class Test {
public static void main(String[] args) {
char c1 = 'A';
char c2 = 'B';
System.out.println(c1 + c2 + "");
}
}
Why the output is 131? Because java calculates the expression from
131
left to right as follow:
c1 + c2 => 'A' + 'B' => 65 + 66 = 131
// Both will be
considered as interger
Now 131 + "" = "131" // integer plus String will be evaluated to
String
Abdul Rahman Sherzad
Thus output will be 131
Page 7 of 11
8. https://www.facebook. com/Oxus20
PART III – Write the program for the following s:
1. Write a method called isAlphaNumeric that accepts a character parameter and returns
true if that character is either an uppercase, lowercase or numeric letter.
Method1: Using Regular Expression
public static boolean isAlphanumeric(String input) {
if (input == null || input.length() == 0)
return false;
if (input.matches("[a-zA-Z0-9]+")) {
return true;
} else {
return false;
}
}
Method2: Using for loop
public static boolean isAlphanumeric(String input) {
if (input == null || input.length() == 0)
return false;
for (int i = 0; i < input.length(); i++) {
char c = input.charAt(i);
if (!((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9'))) {
return false;
}
}
return true;
}
Method3: Using for loop with Character Wrapper Class
public static boolean isAlphanumeric(String input) {
if (input == null || input.length() == 0)
return false;
for (int i = 0; i < input.length(); i++) {
char c = input.charAt(i);
if (!Character.isLetterOrDigit(c)) {
return false;
}
}
return true;
}
Abdul Rahman Sherzad
Page 8 of 11
9. https://www.facebook. com/Oxus20
2. Write a method to count the number of occurrences of a char in a String?
Method1: Using loop with support of String methods
public static int countOccurrences(String strInput, char needle) {
int count = 0;
for (int i = 0; i < strInput.length(); i++) {
if (strInput.charAt(i) == needle) {
count++;
}
}
return count;
}
Method1: Using Advanced for loop
public static int countOccurrences(String strInput, char needle) {
int count = 0;
for (char c : strInput.toCharArray()) {
if (c == needle) {
count++;
}
}
return count;
}
Method1: Using String replaceAll() method
public static int countOccurrences(String strInput, char needle) {
return strInput.length() - strInput.replaceAll(String.valueOf(needle), "").length();
}
return strInput.length() - strInput.replaceAll(String.valueOf(needle), "").length();
Consider strInput = "Abdul Rahman Sherzad" and needle = 'a'
strInput.length() // 20
strInput.replaceAll(String.valueOf(needle), ""); // Abdul Rhmn Sherzd
"Abdul Rhmn Sherzd".length() // 17
Return 20 – 17 = 3 // Thus, letter 'a' appears 3 times in "Abdul Rahman Sherzad".
Abdul Rahman Sherzad
Page 9 of 11
10. https://www.facebook. com/Oxus20
3. Write a method called sumRange that accepts two integers as parameters that
represent a range. Print an error message and return zero if the second parameter
is less than the first. Otherwise, the method should return the sum of the integers
in that range (both first and second parameters are inclusive).
public static int sumRange(int start, int end) {
int sum = 0;
if (end < start) {
System.err.println("ERROR: Invalid Rangen");
} else {
for (int num = start; num <= end; num++) {
sum = sum + num;
}
}
return sum;
}
4. Write a method called isAlpha that accepts a String as parameter and returns true
if the given String contains only either uppercase or lowercase alphabetic letters.
Method1: Using Regular Expression
public static boolean isAlpha(String input) {
if (input == null || input.length() == 0)
return false;
if (input.matches("[a-zA-Z]+"))
return true;
return false;
}
Method2: Using for loop
public static boolean isAlpha(String input) {
if (input == null || input.length() == 0)
return false;
for (int i = 0; i < input.length(); i++) {
char c = input.charAt(i);
if (!((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'))) {
return false;
}
}
return true;
}
Note: similar functionality is provided by the Character.isLetter(c) method as follow:
if (!Character.isLetter(c)) { return false; }
Abdul Rahman Sherzad
OX
US20
Page 10 of 11