This document contains 24 multiple choice questions related to Java programming concepts like object oriented programming, classes, methods, conditionals, loops, and more. It is a sample of 100 multiple choice questions for a CSAP review.
The document discusses various topics related to computing and programming fundamentals. It covers the programming process including developing a program, the program development cycle, algorithms, flowcharts, pseudocode, and program control structures. It provides examples of algorithms, flowcharts, and pseudocode guidelines. The key advantages and limitations of flowcharts and pseudocode are also summarized.
O documento descreve um exemplo de kernel cooperativo para gerenciar processos em um sistema embarcado. O kernel implementa um buffer circular para armazenar os processos, funções para adicionar e remover processos, e um loop infinito que executa os processos de forma cooperativa, reagendando aqueles que precisam ser executados repetidamente. O exercício propõe adaptar o código para a placa e testar o reagendamento e execução de processos que acionam saídas digitais.
This document discusses the concept of polymorphism in object-oriented programming. It defines polymorphism as the ability for objects of different types to respond to the same method call. The key aspects covered are:
- Polymorphism allows objects to take on multiple forms through dynamic binding, where the method executed is determined at runtime based on the actual object type.
- Subclasses can override methods from their parent class, so calling the same method on objects of different types may produce different results.
- Reference variables can refer to objects of their own type or subclasses, providing flexibility.
- The instanceof operator determines an object's actual type at runtime.
- Interfaces support polymorphism by allowing implementation by
Packages in Java allow grouping of related classes and avoid naming collisions. A package is mapped to a directory on the file system where Java files for that package are stored. There are predefined packages provided by Java and user-defined packages can also be created. Packages are specified using the package keyword and imported into other classes using import statements. The classpath variable is used to locate packages and classes for compilation and execution.
This ppt tells about what is Java? What are the requirements of Java? And how it works? For more info about Java and free Java Projects Visit : http://s4al.com/category/study-java/
The document discusses Java programming language and Java virtual machine (JVM). It states that Java code is compiled into bytecode that can run on any JVM, allowing cross-platform portability. The JVM provides a runtime environment and executes bytecode through its components: the bytecode verifier checks for errors, the class loader loads Java classes, the execution engine interprets bytecode into machine code, the garbage collector automatically frees unused memory, and the security manager monitors for security violations.
Explore the fundamental concepts of Operating Systems with this comprehensive set of Multiple Choice Questions (MCQs) designed to test and enhance your understanding of the core principles governing computer systems. Whether you are a student preparing for exams, a professional seeking to refresh your knowledge, or an enthusiast eager to delve into the world of operating systems, these MCQs provide a valuable resource.
Embark on a journey of discovery and mastery with these Operating System MCQs. Test your knowledge, deepen your understanding, and pave the way for success in the dynamic world of operating systems.
[JS EXPERIENCE 2018] Javascript Event Loop além do setInterval - Derek StavisiMasters
The document discusses the JavaScript event loop model. It explains that JavaScript is single-threaded but asynchronous and non-blocking. It uses a call stack, task queue, and event loop to handle concurrency. Functions are added to the call stack and run synchronously until complete, after which they are removed from the stack. Asynchronous functions like timeouts and intervals add callbacks to the task queue to be run asynchronously by the event loop. The event loop continually checks the call stack and task queue, running any queued callbacks after the stack is empty. This allows for asynchronous and concurrent behavior despite single-threading.
This slide about Object Orientated Programing contains Fundamental of OOP, Encapsulation, Inheritance Abstract Class, Association, Polymorphism, Interface, Exceptional Handling and many more OOP language basic thing.
Inheritence, Terminology, Inheritance in java, The class called Object, Super keyword, Example, Method Overriding, Method Overriding example, Abstract Class, Abstract Class Number and the Java Wrapper Classes, Final Method and Classes, Multiple Inheritance
Builder Design Pattern (Generic Construction -Different Representation)Sameer Rathoud
Generic Construction -Different Representation
This presentation provide information to understand builder design pattern, it’s structure, it’s implementation.
Ce chapitre est destiné pour les étudiants de la 2ème année année master Mathématiques, Cryptologie et Sécurité Informatique (MMCSI) Semestre 3. Il traite les concepts de base du langage Java.
The document discusses the super and final keywords in Java. It provides examples of using super to refer to parent class variables and methods, and to call parent class constructors. It also gives examples of using final for variables, methods, and classes. Final variables cannot be reassigned, final methods cannot be overridden, and final classes cannot be extended.
This document describes hash maps and hash tables. It provides examples of using a hash function to map keys to indexes in an array, which can store key-value pairs. It discusses concepts like collisions, load factor, and different strategies for handling collisions like open addressing and closed addressing.
Learn the various forms of polymorphism in Java with illustrative examples to explain method overloading(Compile-time polymorphism) and method overriding(Run-time polymorphism)
Operating System Multiple Choice QuestionsShusil Baral
Here you can find 1000's of Multiple Choice Questions(MCQs) of Operating System(OS) includes the MCQs of fundamental of Operating System and core Operating System.
This document outlines an introduction to competitive programming and problem solving algorithms. It discusses that competitive programming involves writing programs to solve well-known computer science problems quickly. To be successful requires coding quickly, identifying problem types, analyzing time complexity, and extensive practice. The document then covers four basic problem solving paradigms - complete search, divide and conquer, greedy algorithms, and dynamic programming. It provides details on complete search, including that it involves searching the entire solution space and is useful when no clever algorithm exists or the input size is small.
From the moment you open up a website in your browser multiple virtual machines (VMs) are at work. The server generating the website might use Java, your browser executes JavaScript and maybe there is some Flash content running — with everything being executed in a VM.
Virtual machines became increasingly important and popular after Google’s introduction of V8. We expect our code to run fast but let’s step back for a second and see how these complicated pieces of software work. With a better understanding of how your daily ActionScript or JavaScript code is being executed you might start coding a little different.
Join Joa and dive deep into the the world of virtual machines. Learn about different garbage collection strategies and understand why those beasts behave the way they do.
Packages in Java enable grouping of related classes and avoid namespace collisions. Package names use dot notation to represent directory structure. The fully qualified name of a class includes its package. To create a package, the directory structure must match the package name hierarchy. A class belongs to a package by including the package statement at the top of its file and storing the class in the corresponding directory. Packages must be imported or the CLASSPATH set to locate non-default packages.
Inheritance allows classes to inherit characteristics from other classes. There are three types of inheritance: public, protected, and private. Public inheritance makes base class members public or protected in the derived class. Protected inheritance makes base class members protected in the derived class. Private inheritance makes base class members private in the derived class. Polymorphism allows functions to have different implementations depending on the type of object that calls it. Virtual functions provide polymorphism by allowing derived classes to override base class function implementations through late binding.
Detailed presentation on Inheritance and interfaces in JAVA. Presentation includes suitable example for better understanding the concepts such as Overriding in java and also keywords such as FINAL and SUPER.
This is an intermediate conversion course for C++, suitable for second year computing students who may have learned Java or another language in first year.
This document introduces Java by presenting its syntax, API, and how to build stand-alone programs and applets. It explains that Java is object-oriented, platform independent, and more secure than other languages like C++. It demonstrates how to write a simple "Hello World" program in Java and covers Java concepts like classes, objects, methods, and primitive data types. The document also discusses how Java code is compiled to bytecode and executed by the Java Virtual Machine.
The document discusses enterprise resource planning (ERP) and key factors for successful ERP implementation. It notes that 40% of companies fail to achieve their business goals even a year after implementing ERP. ERP implementation requires business process redesign, new information technology capabilities, and managing risks and change. Successful ERP projects have clear leadership, realistic plans, personnel selection, communication, and monitoring progress.
Brand Optimization Service offered by MobiWebMedia, Boutique Web Marketing Agency.
Discover how you can become more visible online and grow your business with brand optimization.
[JS EXPERIENCE 2018] Javascript Event Loop além do setInterval - Derek StavisiMasters
The document discusses the JavaScript event loop model. It explains that JavaScript is single-threaded but asynchronous and non-blocking. It uses a call stack, task queue, and event loop to handle concurrency. Functions are added to the call stack and run synchronously until complete, after which they are removed from the stack. Asynchronous functions like timeouts and intervals add callbacks to the task queue to be run asynchronously by the event loop. The event loop continually checks the call stack and task queue, running any queued callbacks after the stack is empty. This allows for asynchronous and concurrent behavior despite single-threading.
This slide about Object Orientated Programing contains Fundamental of OOP, Encapsulation, Inheritance Abstract Class, Association, Polymorphism, Interface, Exceptional Handling and many more OOP language basic thing.
Inheritence, Terminology, Inheritance in java, The class called Object, Super keyword, Example, Method Overriding, Method Overriding example, Abstract Class, Abstract Class Number and the Java Wrapper Classes, Final Method and Classes, Multiple Inheritance
Builder Design Pattern (Generic Construction -Different Representation)Sameer Rathoud
Generic Construction -Different Representation
This presentation provide information to understand builder design pattern, it’s structure, it’s implementation.
Ce chapitre est destiné pour les étudiants de la 2ème année année master Mathématiques, Cryptologie et Sécurité Informatique (MMCSI) Semestre 3. Il traite les concepts de base du langage Java.
The document discusses the super and final keywords in Java. It provides examples of using super to refer to parent class variables and methods, and to call parent class constructors. It also gives examples of using final for variables, methods, and classes. Final variables cannot be reassigned, final methods cannot be overridden, and final classes cannot be extended.
This document describes hash maps and hash tables. It provides examples of using a hash function to map keys to indexes in an array, which can store key-value pairs. It discusses concepts like collisions, load factor, and different strategies for handling collisions like open addressing and closed addressing.
Learn the various forms of polymorphism in Java with illustrative examples to explain method overloading(Compile-time polymorphism) and method overriding(Run-time polymorphism)
Operating System Multiple Choice QuestionsShusil Baral
Here you can find 1000's of Multiple Choice Questions(MCQs) of Operating System(OS) includes the MCQs of fundamental of Operating System and core Operating System.
This document outlines an introduction to competitive programming and problem solving algorithms. It discusses that competitive programming involves writing programs to solve well-known computer science problems quickly. To be successful requires coding quickly, identifying problem types, analyzing time complexity, and extensive practice. The document then covers four basic problem solving paradigms - complete search, divide and conquer, greedy algorithms, and dynamic programming. It provides details on complete search, including that it involves searching the entire solution space and is useful when no clever algorithm exists or the input size is small.
From the moment you open up a website in your browser multiple virtual machines (VMs) are at work. The server generating the website might use Java, your browser executes JavaScript and maybe there is some Flash content running — with everything being executed in a VM.
Virtual machines became increasingly important and popular after Google’s introduction of V8. We expect our code to run fast but let’s step back for a second and see how these complicated pieces of software work. With a better understanding of how your daily ActionScript or JavaScript code is being executed you might start coding a little different.
Join Joa and dive deep into the the world of virtual machines. Learn about different garbage collection strategies and understand why those beasts behave the way they do.
Packages in Java enable grouping of related classes and avoid namespace collisions. Package names use dot notation to represent directory structure. The fully qualified name of a class includes its package. To create a package, the directory structure must match the package name hierarchy. A class belongs to a package by including the package statement at the top of its file and storing the class in the corresponding directory. Packages must be imported or the CLASSPATH set to locate non-default packages.
Inheritance allows classes to inherit characteristics from other classes. There are three types of inheritance: public, protected, and private. Public inheritance makes base class members public or protected in the derived class. Protected inheritance makes base class members protected in the derived class. Private inheritance makes base class members private in the derived class. Polymorphism allows functions to have different implementations depending on the type of object that calls it. Virtual functions provide polymorphism by allowing derived classes to override base class function implementations through late binding.
Detailed presentation on Inheritance and interfaces in JAVA. Presentation includes suitable example for better understanding the concepts such as Overriding in java and also keywords such as FINAL and SUPER.
This is an intermediate conversion course for C++, suitable for second year computing students who may have learned Java or another language in first year.
This document introduces Java by presenting its syntax, API, and how to build stand-alone programs and applets. It explains that Java is object-oriented, platform independent, and more secure than other languages like C++. It demonstrates how to write a simple "Hello World" program in Java and covers Java concepts like classes, objects, methods, and primitive data types. The document also discusses how Java code is compiled to bytecode and executed by the Java Virtual Machine.
The document discusses enterprise resource planning (ERP) and key factors for successful ERP implementation. It notes that 40% of companies fail to achieve their business goals even a year after implementing ERP. ERP implementation requires business process redesign, new information technology capabilities, and managing risks and change. Successful ERP projects have clear leadership, realistic plans, personnel selection, communication, and monitoring progress.
Brand Optimization Service offered by MobiWebMedia, Boutique Web Marketing Agency.
Discover how you can become more visible online and grow your business with brand optimization.
This document outlines the sections and information to be included in a marketing plan. It includes sections on conducting a situation analysis of the industry, company, product, market and competition. It also includes sections on defining marketing objectives and strategies, developing action plans and tactics, and establishing methods to measure and control the marketing effort. A budget section allocates funds to elements like new product research, marketing research, sales and advertising.
The document discusses the basic steps of query processing which include query parsing and translation to check syntax and transform the query to a relational algebra expression, query optimization to transform the initial query plan into the best plan based on the dataset by specifying operations and algorithms, and query evaluation to execute the optimized query plan and return the results.
The document contains contact information for WThree.ca, including an email address of [email protected], a phone number of (306) 974 6100, and a website of WThree.ca. This information is repeated over 15 lines.
Analysis of the Content course of Standard VI to VIII (Tamil, English, Mathematics, Science and Social science) Text Books prescribed by Government of Tamil Nadu, and content course of standard IX - X ( for UG) , XI – XII (for PG) Computer Science Text Books Prescribed by Government of Tamil Nadu.
The document contains 46 multiple choice questions related to various topics in computer science including computer hardware, programming, data structures, operating systems, databases, and networking. Each question is followed by multiple choice answers for selection.
The document discusses organizational fitness and outlines areas that leadership must focus on to ensure an organization is performing at its best level. It identifies financial agility, growing customer base, excellence in production/services, and the right employees as key parts of an organization's fitness. Under business excellence, it recommends focusing on vision, value offerings, and evolution. For operational excellence, it suggests understanding benchmarks, integrating cross-functional skills for problem solving, and empowering self-directed teams. Finally, it states that employees are critical to achieving organizational goals and facilitating their full potential.
The Dallas Afterschool Millennial Advisory Council (MAC) was created to engage and educate millennials about afterschool programs, train them for nonprofit boards, and develop the next generation of community leaders. The MAC encourages philanthropy and civic engagement by providing professional and leadership development opportunities. Young professionals serve as Dallas Afterschool ambassadors, volunteer in afterschool programs, and gain skills to benefit their careers and communities.
The document discusses the ABA problem that can occur in non-blocking concurrent queue algorithms. It shows an example of how the ABA problem can allow a thread to incorrectly retrieve another thread's data from the queue. It then describes two common solutions to the ABA problem - adding version numbers to data structures or using load-linked/store-conditional instructions. Finally, it shows pseudocode for an enqueue operation of a non-blocking concurrent queue that avoids the ABA problem by using a double-compare-and-swap with version numbers.
This document provides information about the 2016 Korea TESOL National Conference with the theme "Our Provinces". The conference will take place on May 28, 2016 at Sangji University in Wonju, Korea. The summary includes:
- An overview of the conference schedule including times, locations, and topics of presentations in the morning, afternoon, and closing sessions.
- Biographies of some of the presenters, including their areas of research/teaching interests.
- Welcome messages from the Conference Chair and KOTESOL President introducing the conference theme and goals of bringing English language teachers together from around Korea.
What is PL/SQL
Procedural Language – SQL
An extension to SQL with design features of programming languages (procedural and object oriented)
PL/SQL and Java are both supported as internal host languages within Oracle products.
important C questions and_answers praveensomeshpraveensomesh
This document contains 40 multiple choice questions related to the C programming language. The questions cover topics like data types, operators, arrays, pointers, functions, input/output, and more. Each question is followed by 4 possible answers, with the correct answer indicated. This quiz can be used to test knowledge of core C programming concepts and help identify areas requiring more study.
This document contains 25 multiple choice questions about data types, operators, functions, structures, and control flow statements in C programming. For each question there are 4 possible answers with one being identified as the correct answer. The questions cover a range of fundamental C programming concepts and test understanding of how different language constructs work.
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 ...
The document contains 15 multiple choice questions related to C++ programming. The questions cover topics like class constructors, function overloading criteria, static arrays, references, constants, inheritance, and more. Sample code is provided for each question.
C multiple choice questions and answers pdfchoconyeuquy
The document contains 20 coding questions and explanations of their answers in C programming. It discusses concepts like data types, operators, loops, functions, pointers, macros, structures and more. The questions test understanding of how C code is compiled and executed, and what output would result from each code snippet.
In C language, operators are categorized into six main categories - arithmetic, relational, logical, bitwise, assignment, and ternary. Arithmetic operators perform basic mathematical operations like addition, subtraction etc. Relational operators compare two expressions and return 0 or 1. Logical operators combine two or more operands. Bitwise operators operate on bits of operands. Assignment operators assign values to operands. Ternary operators use the ?: syntax to evaluate conditional expressions.
The document contains a set of multiple choice questions and answers related to programming in C. Some key points covered include:
- Literal means a string constant
- Coercion refers to implicit type conversion
- The output of printf("%d", printf("tim")); is tim3
- Automatic variables that are not initialized have an unpredictable value
- main() is often called a high level language
The document contains 35 multiple choice questions testing C++ programming knowledge. The questions cover topics such as object-oriented programming, classes, functions, operators, I/O, data types, arrays, pointers, structures, and algorithms. The correct answer is provided for each question.
Object oriented programming (OOP) provides more secure programs by hiding data. This document contains a 50-question multiple choice quiz on OOP concepts for a class. It tests knowledge of OOP principles like encapsulation, inheritance, polymorphism, abstraction. It also covers Java topics like classes, objects, methods, packages. The questions range from basic syntax and terminology to analyzing code snippets and designing programs based on scenarios.
The document appears to be a test paper containing multiple choice questions about C, C++ language concepts. There are 43 questions testing knowledge of topics like C language syntax, data types, operators, loops, functions, pointers, arrays and structures. The questions have a single correct answer among 4 options for each.
This document contains 20 multiple choice questions about pointers, arrays, structures and other C programming concepts. The questions cover topics like pointers and pointer arithmetic, arrays, structures, strings, data types and more. Multiple choice options are provided for each question to test the reader's knowledge of these fundamental C programming concepts.
This document contains 35 multiple choice questions about C++ programming concepts including:
- Output of sample C++ code involving pre-increment and post-increment operators.
- Uses of null pointers, infinite loops, function overloading, and header files.
- Meanings and uses of escape codes, stream insertion operator, object-oriented terminology, and static and dynamic polymorphism concepts.
- Characteristics of classes, objects, inheritance, abstract classes, and access specifiers.
- Exceptions, polymorphism types, default arguments, abstract class instances, friends, and late binding implementation in C++.
This document contains a series of revision exercises for the topic of computer programming in the C language. It includes multiple choice questions, fill-in-the-blank questions, and questions that require writing small segments of C code to demonstrate understanding of concepts like variable declarations, arithmetic expressions, functions, pointers, and more. The exercises cover a wide range of fundamental C programming topics for students to practice and reinforce their learning.
1z0 851 exam-java standard edition 6 programmer certified professionalIsabella789
Guaranteed success with updated troytec dumps for 1Z0-851 Exam-Java Standard Edition 6 Programmer Certified Professional visit@ https://www.troytec.com/1Z0-851-exams.html
This program defines floating point variables a and b and initializes them to 0.001 and 0.003 respectively. It also defines a floating point variable c and pointers pa and pb. Pa is initialized to point to a, and pb is initialized to point to b. The value of a is then doubled through pa. The question asks to complete the statement to calculate c based on the other variables.
The document contains a C++ programming quiz with 55 multiple choice questions related to topics like C++ fundamentals, OOPs concepts, pointers, strings, inheritance, polymorphism, operator overloading etc. Each question is followed by 4 answer options and the correct answer is highlighted. The questions test knowledge of basic C++ syntax, language features and their applications.
This document contains 26 multiple choice questions about Java programming concepts like keywords, variables, data types, operators, control flow etc. Each question is followed by 4-5 answer options and an explanation of the correct answer. The questions test knowledge of basic Java syntax, semantics and language features.
This presentation discusses the following topics:
Basic features of R
Exploring R GUI
Data Frames & Lists
Handling Data in R Workspace
Reading Data Sets & Exporting Data from R
Manipulating & Processing Data in R
Association rule mining is used to find relationships between items in transaction data. It identifies rules that can predict the occurrence of an item based on other items purchased together frequently. Some key metrics used to evaluate rules include support, which measures how frequently an itemset occurs; confidence, which measures how often items in the predicted set occur given items in the predictor set; and lift, which compares the confidence to expected confidence if items were independent. An example association rule evaluated is {Milk, Diaper} -> {Beer} with support of 0.4, confidence of 0.67, and lift of 1.11.
This document discusses clustering, which is the task of grouping data points into clusters so that points within the same cluster are more similar to each other than points in other clusters. It describes different types of clustering methods, including density-based, hierarchical, partitioning, and grid-based methods. It provides examples of specific clustering algorithms like K-means, DBSCAN, and discusses applications of clustering in fields like marketing, biology, libraries, insurance, city planning, and earthquake studies.
Classification is a data analysis technique used to predict class membership for new observations based on a training set of previously labeled examples. It involves building a classification model during a training phase using an algorithm, then testing the model on new data to estimate accuracy. Some common classification algorithms include decision trees, Bayesian networks, neural networks, and support vector machines. Classification has applications in domains like medicine, retail, and entertainment.
The document discusses the assumptions and properties of ordinary least squares (OLS) estimators in linear regression analysis. It notes that OLS estimators are best linear unbiased estimators (BLUE) if the assumptions of the linear regression model are met. Specifically, it assumes errors have zero mean and constant variance, are uncorrelated, and are normally distributed. Violation of the assumption of constant variance is known as heteroscedasticity. The document outlines how heteroscedasticity impacts the properties of OLS estimators and their use in applications like econometrics.
This document provides an introduction to regression analysis. It discusses that regression analysis investigates the relationship between dependent and independent variables to model and analyze data. The document outlines different types of regressions including linear, polynomial, stepwise, ridge, lasso, and elastic net regressions. It explains that regression analysis is used for predictive modeling, forecasting, and determining the impact of variables. The benefits of regression analysis are that it indicates significant relationships and the strength of impact between variables.
MYCIN was an early expert system developed at Stanford University in 1972 to assist physicians in diagnosing and selecting treatment for bacterial and blood infections. It used over 600 production rules encoding the clinical decision criteria of infectious disease experts to diagnose patients based on reported symptoms and test results. While it could not replace human diagnosis due to computing limitations at the time, MYCIN demonstrated that expert knowledge could be represented computationally and established a foundation for more advanced machine learning and knowledge base systems.
The document discusses expert systems, which are computer applications that solve complex problems at a human expert level. It describes the characteristics and capabilities of expert systems, why they are useful, and their key components - knowledge base, inference engine, and user interface. The document also outlines common applications of expert systems and the general development process.
The Dempster-Shafer Theory was developed by Arthur Dempster in 1967 and Glenn Shafer in 1976 as an alternative to Bayesian probability. It allows one to combine evidence from different sources and obtain a degree of belief (or probability) for some event. The theory uses belief functions and plausibility functions to represent degrees of belief for various hypotheses given certain evidence. It was developed to describe ignorance and consider all possible outcomes, unlike Bayesian probability which only considers single evidence. An example is given of using the theory to determine the murderer in a room with 4 people where the lights went out.
A Bayesian network is a probabilistic graphical model that represents conditional dependencies among random variables using a directed acyclic graph. It consists of nodes representing variables and directed edges representing causal relationships. Each node contains a conditional probability table that quantifies the effect of its parent nodes on that variable. Bayesian networks can be used to calculate the probability of events occurring based on the network structure and conditional probability tables, such as computing the probability of an alarm sounding given that no burglary or earthquake occurred but two neighbors called.
This document discusses knowledge-based agents in artificial intelligence. It defines knowledge-based agents as agents that maintain an internal state of knowledge, reason over that knowledge, update their knowledge based on observations, and take actions. Knowledge-based agents have two main components: a knowledge base that stores facts about the world, and an inference system that applies logical rules to deduce new information from the knowledge base. The document also describes the architecture of knowledge-based agents and different approaches to designing them.
A rule-based system uses predefined rules to make logical deductions and choices to perform automated actions. It consists of a database of rules representing knowledge, a database of facts as inputs, and an inference engine that controls the process of deriving conclusions by applying rules to facts. A rule-based system mimics human decision making by applying rules in an "if-then" format to incoming data to perform actions, but unlike AI it does not learn or adapt on its own.
This document discusses formal logic and its applications in AI and machine learning. It begins by explaining why logic is useful in complex domains or with little data. It then describes logic-based approaches to AI that use symbolic reasoning as an alternative to machine learning. The document proceeds to explain propositional logic and first-order logic, noting how first-order logic improves on propositional logic by allowing variables. It also mentions other logics and their applications in areas like automated discovery, inductive programming, and verification of computer systems and machine learning models.
The document discusses production systems, which are rule-based systems used in artificial intelligence to model intelligent behavior. A production system consists of a global database, set of production rules, and control system. The rules fire to modify the database based on conditions. Different control strategies are used to determine which rules fire. Production systems are modular and allow knowledge representation as condition-action rules. Examples of applications in problem solving are provided.
The document discusses game playing in artificial intelligence. It describes how general game playing (GGP) involves designing AI that can play multiple games by learning the rules, rather than being programmed for a specific game. The document outlines how the minimax algorithm is commonly used for game playing, involving move generation and static evaluation functions to search game trees and determine the best move by maximizing or minimizing values at each level.
A study on “Diagnosis Test of Diabetics and Hypertension by AI”, Presentation slides for International Conference on "Life Sciences: Acceptance of the New Normal", St. Aloysius' College, Jabalpur, Madhya Pradesh, India, 27-28 August, 2021
A study on “impact of artificial intelligence in covid19 diagnosis”Dr. C.V. Suresh Babu
A study on “Impact of Artificial Intelligence in COVID-19 Diagnosis”, Presentation slides for International Conference on "Life Sciences: Acceptance of the New Normal", St. Aloysius' College, Jabalpur, Madhya Pradesh, India, 27-28 August, 2021
A study on “impact of artificial intelligence in covid19 diagnosis”Dr. C.V. Suresh Babu
Although the lungs are one of the most vital organs in the body, they are vulnerable to infection and injury. COVID-19 has put the entire world in an unprecedented difficult situation, bringing life to a halt and claiming thousands of lives all across the world. Medical imaging, such as X-rays and computed tomography (CT), is essential in the global fight against COVID-19, and newly emerging artificial intelligence (AI) technologies are boosting the power of imaging tools and assisting medical specialists. AI can improve job efficiency by precisely identifying infections in X-ray and CT images and allowing further measurement. We focus on the integration of AI with X-ray and CT, both of which are routinely used in frontline hospitals, to reflect the most recent progress in medical imaging and radiology combating COVID-19.
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsesushreesangita003
what is pulse ?
Purpose
physiology and Regulation of pulse
Characteristics of pulse
factors affecting pulse
Sites of pulse
Alteration of pulse
for BSC Nursing 1st semester
for Gnm Nursing 1st year
Students .
vitalsign
Odoo Inventory Rules and Routes v17 - Odoo SlidesCeline George
Odoo's inventory management system is highly flexible and powerful, allowing businesses to efficiently manage their stock operations through the use of Rules and Routes.
A measles outbreak originating in West Texas has been linked to confirmed cases in New Mexico, with additional cases reported in Oklahoma and Kansas. The current case count is 817 from Texas, New Mexico, Oklahoma, and Kansas. 97 individuals have required hospitalization, and 3 deaths, 2 children in Texas and one adult in New Mexico. These fatalities mark the first measles-related deaths in the United States since 2015 and the first pediatric measles death since 2003.
The YSPH Virtual Medical Operations Center Briefs (VMOC) were created as a service-learning project by faculty and graduate students at the Yale School of Public Health in response to the 2010 Haiti Earthquake. Each year, the VMOC Briefs are produced by students enrolled in Environmental Health Science Course 581 - Public Health Emergencies: Disaster Planning and Response. These briefs compile diverse information sources – including status reports, maps, news articles, and web content– into a single, easily digestible document that can be widely shared and used interactively. Key features of this report include:
- Comprehensive Overview: Provides situation updates, maps, relevant news, and web resources.
- Accessibility: Designed for easy reading, wide distribution, and interactive use.
- Collaboration: The “unlocked" format enables other responders to share, copy, and adapt seamlessly. The students learn by doing, quickly discovering how and where to find critical information and presenting it in an easily understood manner.
CURRENT CASE COUNT: 817 (As of 05/3/2025)
• Texas: 688 (+20)(62% of these cases are in Gaines County).
• New Mexico: 67 (+1 )(92.4% of the cases are from Eddy County)
• Oklahoma: 16 (+1)
• Kansas: 46 (32% of the cases are from Gray County)
HOSPITALIZATIONS: 97 (+2)
• Texas: 89 (+2) - This is 13.02% of all TX cases.
• New Mexico: 7 - This is 10.6% of all NM cases.
• Kansas: 1 - This is 2.7% of all KS cases.
DEATHS: 3
• Texas: 2 – This is 0.31% of all cases
• New Mexico: 1 – This is 1.54% of all cases
US NATIONAL CASE COUNT: 967 (Confirmed and suspected):
INTERNATIONAL SPREAD (As of 4/2/2025)
• Mexico – 865 (+58)
‒Chihuahua, Mexico: 844 (+58) cases, 3 hospitalizations, 1 fatality
• Canada: 1531 (+270) (This reflects Ontario's Outbreak, which began 11/24)
‒Ontario, Canada – 1243 (+223) cases, 84 hospitalizations.
• Europe: 6,814
Title: A Quick and Illustrated Guide to APA Style Referencing (7th Edition)
This visual and beginner-friendly guide simplifies the APA referencing style (7th edition) for academic writing. Designed especially for commerce students and research beginners, it includes:
✅ Real examples from original research papers
✅ Color-coded diagrams for clarity
✅ Key rules for in-text citation and reference list formatting
✅ Free citation tools like Mendeley & Zotero explained
Whether you're writing a college assignment, dissertation, or academic article, this guide will help you cite your sources correctly, confidently, and consistent.
Created by: Prof. Ishika Ghosh,
Faculty.
📩 For queries or feedback: [email protected]
INTRO TO STATISTICS
INTRO TO SPSS INTERFACE
CLEANING MULTIPLE CHOICE RESPONSE DATA WITH EXCEL
ANALYZING MULTIPLE CHOICE RESPONSE DATA
INTERPRETATION
Q & A SESSION
PRACTICAL HANDS-ON ACTIVITY
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetSritoma Majumder
Introduction
All the materials around us are made up of elements. These elements can be broadly divided into two major groups:
Metals
Non-Metals
Each group has its own unique physical and chemical properties. Let's understand them one by one.
Physical Properties
1. Appearance
Metals: Shiny (lustrous). Example: gold, silver, copper.
Non-metals: Dull appearance (except iodine, which is shiny).
2. Hardness
Metals: Generally hard. Example: iron.
Non-metals: Usually soft (except diamond, a form of carbon, which is very hard).
3. State
Metals: Mostly solids at room temperature (except mercury, which is a liquid).
Non-metals: Can be solids, liquids, or gases. Example: oxygen (gas), bromine (liquid), sulphur (solid).
4. Malleability
Metals: Can be hammered into thin sheets (malleable).
Non-metals: Not malleable. They break when hammered (brittle).
5. Ductility
Metals: Can be drawn into wires (ductile).
Non-metals: Not ductile.
6. Conductivity
Metals: Good conductors of heat and electricity.
Non-metals: Poor conductors (except graphite, which is a good conductor).
7. Sonorous Nature
Metals: Produce a ringing sound when struck.
Non-metals: Do not produce sound.
Chemical Properties
1. Reaction with Oxygen
Metals react with oxygen to form metal oxides.
These metal oxides are usually basic.
Non-metals react with oxygen to form non-metallic oxides.
These oxides are usually acidic.
2. Reaction with Water
Metals:
Some react vigorously (e.g., sodium).
Some react slowly (e.g., iron).
Some do not react at all (e.g., gold, silver).
Non-metals: Generally do not react with water.
3. Reaction with Acids
Metals react with acids to produce salt and hydrogen gas.
Non-metals: Do not react with acids.
4. Reaction with Bases
Some non-metals react with bases to form salts, but this is rare.
Metals generally do not react with bases directly (except amphoteric metals like aluminum and zinc).
Displacement Reaction
More reactive metals can displace less reactive metals from their salt solutions.
Uses of Metals
Iron: Making machines, tools, and buildings.
Aluminum: Used in aircraft, utensils.
Copper: Electrical wires.
Gold and Silver: Jewelry.
Zinc: Coating iron to prevent rusting (galvanization).
Uses of Non-Metals
Oxygen: Breathing.
Nitrogen: Fertilizers.
Chlorine: Water purification.
Carbon: Fuel (coal), steel-making (coke).
Iodine: Medicines.
Alloys
An alloy is a mixture of metals or a metal with a non-metal.
Alloys have improved properties like strength, resistance to rusting.
Exploring Substances:
Acidic, Basic, and
Neutral
Welcome to the fascinating world of acids and bases! Join siblings Ashwin and
Keerthi as they explore the colorful world of substances at their school's
National Science Day fair. Their adventure begins with a mysterious white paper
that reveals hidden messages when sprayed with a special liquid.
In this presentation, we'll discover how different substances can be classified as
acidic, basic, or neutral. We'll explore natural indicators like litmus, red rose
extract, and turmeric that help us identify these substances through color
changes. We'll also learn about neutralization reactions and their applications in
our daily lives.
by sandeep swamy
GDGLSPGCOER - Git and GitHub Workshop.pptxazeenhodekar
This presentation covers the fundamentals of Git and version control in a practical, beginner-friendly way. Learn key commands, the Git data model, commit workflows, and how to collaborate effectively using Git — all explained with visuals, examples, and relatable humor.
How to Subscribe Newsletter From Odoo 18 WebsiteCeline George
Newsletter is a powerful tool that effectively manage the email marketing . It allows us to send professional looking HTML formatted emails. Under the Mailing Lists in Email Marketing we can find all the Newsletter.
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schoolsdogden2
Algebra 1 is often described as a “gateway” class, a pivotal moment that can shape the rest of a student’s K–12 education. Early access is key: successfully completing Algebra 1 in middle school allows students to complete advanced math and science coursework in high school, which research shows lead to higher wages and lower rates of unemployment in adulthood.
Learn how The Atlanta Public Schools is using their data to create a more equitable enrollment in middle school Algebra classes.
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schoolsdogden2
Oops Quiz
1. CSAP Review – 100 Sample Multiple Choice Questions
1. Object Oriented Programming
(A) makes programs more reliable.
(B) simulates real life.
(C) uses a lot of intimidating vocabulary, which is not as bad as it sounds.
(D) is all of the above.
2. The actions in a Java class are called
(A) procedures.
(B) functions.
(C) methods.
(D) subroutines.
3. Which of the following Math class features do not use any parameters or
arguments?
(A) PI
(B) E
(C) final
(D) Both A and B
4. What is the value of result in the following statement?
int result = Math.pow(3,4);
(A) 12
(B) 81
(C) 64
(D) 4
For questions 5-8 use the following Bank class information. It contains the
headings of the methods in the Bank class, along with a description.
public Bank()
// default constructor starts checking and savings account with zero
dollars.
public Bank(double c, double s)
// parameter creates an object with c dollars in checking and s dollars in
savings.
2. public double getChecking()
// returns the checking account balance
public double getSavings()
// returns the savings account balance
public double getCombined()
// returns the combined balance of the checking and savings account
public void changeChecking(double amount)
// alters the balance of the checking account by the amount parameter
public void changeSavings(double amount)
// alters the balance of the savings account by the amount parameter
public void closeChecking()
// alters the checking account balance to zero
public void closeSavings()
// alters the savings account balance to zero
5. The methods in the Math class are
(A) class methods.
(B) object methods.
(C) expression methods.
(D) variable methods.
6. The methods in the Bank class are
(A) class methods.
(B) object methods.
(C) expression methods.
(D) variable methods.
7. Access to methods of the Bank class requires
3. (A) using a statement, like Bank.getSavings();
(B) using a statement, like Bank.getSavings;
(C) the creation of one or more Bank objects.
(D) using the get method.
8. What is the output of the following program segment?
Bank tom;
tom = new Bank();
Bank sue;
sue = new Bank();
tom.changeChecking(1000);
sue.changeChecking(1500);
System.out.println("sue: " + sue.getSavings());
System.out.println("tom: " + tom.getSavings());
(A) tom: 1000.0
sue: 1500.0
(B) sue: 1500.0
tom: 1000.0
(C) sue: 0.0
tom: 0.0
(D) Error message
9. Assume that rand is an object of the Random class. Which of the following
statements generates a random integer in the [400..1600] range?
(A) int number = rand.nextInt(1600) + 400;
(B) int number = rand.nextInt(1200) + 400;
(C) int number = rand.nextInt(1600);
(D) int number = rand.nextInt(1201) + 400;
10. The kind of output created by an object of the DecimalFormat class is
determined by
(A) the type of parameter used with the construction of a new DecimalFormat
object.
(B) using the format method.
(C) using the output method.
(D) all of the above.
11. A conditional statement is
4. (A) a program expression that evaluates to true or false.
(B) a program statement that requires input from the keyboard.
(C) any program statement with a binary operator.
(D) any program statement with an unary operator.
12. What is the output of the following program segment?
double bonus = 500.0;
double sales = 200000.0;
if (sales >= 300000.0)
bonus += 250.0;
System.out.println("Bonus: " + bonus);
System.out.println("The End");
(A) Bonus: 50.0
The End
(B) Bonus: 500.0
The End
(C) Bonus: 750.0
The End
(D) No output
13. What is the output of the following program segment?
double bonus = 500.0;
double sales = 200000.0;
if (sales >= 300000.0)
bonus += 250.0;
System.out.println("Bonus: " + bonus);
System.out.println("The End");
(A) Bonus: 50.0
The End
(B) Bonus: 500.0
The End
(C) Bonus: 750.0
The End
(D) No output
14. What is the output of the following program segment?
double bonus = 500.0;
double sales = 200000.0;
if (sales >= 300000.0)
System.out.println("Bonus: " + bonus);
5. bonus += 250.0;
(A) Bonus: 250.0
(B) Bonus: 500.0
(C) Bonus: 750.0
(D) No output
15. What is the output of the following program segment?
int n1 = 100;
int n2 = 200;
int n3 = n1 / n2;
if (n3 > 0)
{
n2 = n1;
n1 = n2;
}
else
{
n1 = n2;
n2 = n1;
}
System.out.println(n1 + " " + n2);
(A) 100 200
(B) 200 100
(C) 200 200
(D) 100 100
16. What is the value of num at the conclusion of the following program segment?
char qwerty = 'B';
int num = 100;
switch(qwerty)
{
case 'A':
num ++;
case 'B':
num += 2;
case 'C':
num += 3;
case 'D':
num += 4;
}
6. (A) 100
(B) 102
(C) 109
(D) Error message
17. What is the value of num at the conclusion of the following program segment?
char qwerty = 'B';
int num = 100;
switch(qwerty)
{
case 'A':
num ++;
break;
case 'B':
num += 2;
break;
case 'C':
num += 3;
break;
case 'D':
num += 4;
}
(A) 100
(B) 101
(C) 102
(D) Error message
18. What is the output of the following program segment?
int count = 1;
for (int k = 0; k < 100; k++)
count++;
System.out.println(count);
(A) 99
(B) 100
(C) 101
(D) 102
19. What is the output of the following program segment?
7. int count1 = 1;
int count2 = 2;
for (int k = 0; k <= 5; k++)
{
count1++;
count2++;
}
System.out.println(count1 + " " + count2);
(A) 6 7
(B) 7 8
(C) 6 3
(D) 7 3
20. What is the output of the following program segment?
int sum = 0;
for (int k = 1; k < 9; k+=2)
sum += k;
System.out.println("sum: " + sum);
(A) sum: 8
(B) sum: 9
(C) sum: 16
(D) sum: 25
21. What is the output of the following program segment?
int num1 = 120;
int num2 = 108;
int num3 = 0;
do
{
num3 = num1 % num2;
if (num3 == 0)
System.out.println(num2);
else
{
num1 = num2;
num2 = num3;
}
}
while (num3 != 0);
(A) 0
(B) 6
8. (C) 12
(D) 36
22. A class method call
(A) requires that the class identifier precedes the method identifier.
(B) may be called with the method identifier only in certain circumstances.
(C) is only possible after a new object is constructed.
(D) uses the class identifier only for readability.
23. What is the output of the following program?
public class Q39
{
public static void main(String args [ ])
{
method1();
method3();
method2();
}
public static void method1()
{
System.out.println("Calling method 1");
}
public static void method2()
{
System.out.println("Calling method 3");
}
public static void method3()
{
System.out.println("Calling method 2");
}
}
(A) Calling method 1
Calling method 2
Calling method 3
(B) Calling method 1
Calling method 3
Calling method 2
9. (C) method 1
method 3
method 2
(D) Error message
24. What is the output of the following program?
public class Q41
{
public static void main(String args [ ])
{
method1(1);
method3(2);
method2(3);
}
public static void method1(int n)
{
System.out.println("Calling method " + n);
}
public static void method2(int n)
{
System.out.println("Calling method " + n);
}
public static void method3(int n)
{
System.out.println("Calling method " + n);
}
}
(A) Calling method 1
Calling method 2
Calling method 3
(B) Calling method 1
Calling method 3
Calling method 2
10. (C) method 1
method 3
method 2
(D) Error message
25. What is the output of the following program?
public class Q42
{
public static void main(String args [ ])
{
Q42.method1(int n = 1 );
Q42.method2(int n = 2);
Q42.method3(int n = 3);
}
public static void method1(int n)
{
System.out.println("Calling method " + n);
}
public static void method2(int n)
{
System.out.println("Calling method " + n);
}
public static void method3(int n)
{
System.out.println("Calling method " + n);
}
}
(A) Calling method1
Calling method2
Calling method3
(B) Calling method1
Calling method3
Calling method2
(C) method1
method2
11. method3
(D) Error message
26. What is the output of the following program?
public class Q44
{
public static void main(String args [ ])
{
int x = 25;
int y = 10;
System.out.println(Calc.add(x,y));
System.out.println(Calc.sub(x,y));
System.out.println(Calc.mul(x,y));
System.out.println(Calc.div(x,y));
}
}
class Calc
{
public static void add(int p, int q)
{
int result = p + q;
System.out.println(p + " + " + q + " = " + result);
}
public static void sub(int p, int q)
{
int result = p - q;
System.out.println(p + " - " + q + " = " + result);
}
public static void mul(int p, int q)
{
int result = p * q;
System.out.println(p + " * " + q + " = " + result);
}
public static void div(int p, int q)
{
int result = p / q;
System.out.println(p + " / " + q + " = " + result);
}
}
(A) 25 + 10 (B) 25 + 10 = 35 (C) 35
25 - 10 25 - 10 = 15 15
25 * 10 25 * 10 = 250 250
12. 26 / 10 25 / 10 = 2 2
(D) Error message
27. Class methods are typically used when
(A) only a single copy of the class needs to be loaded
(B) multiple copies or instances of a class are required.
(C) it is not necessary to pass information to the methods.
(D) only return methods are used in a class.
28. Object methods are typically used when
(A) only a single copy of the class needs to be loaded
(B) multiple copies or instances of a class are required.
(C) it is not necessary to pass information to the methods.
(D) only return methods are used in a class.
29. Which of the following statements shows correct syntax to create an object of the
Piggy class?
(A) Piggy new tom = Piggy();
(B) Piggy = new tom();
(C) Piggy tom = new Piggy();
(D) tom = new Piggy;
30. An object is
(A) one instance of a class.
(B) another word for a class.
(C) a class with static methods.
(D) a method that accesses class attributes.
31. Calling a class method requires using
(A) a class identifier followed by a dot and a method identifier.
(B) a method identifier followed by a dot and a class identifier.
(C) an object identifier followed by a dot and a method identifier.
(D) a method identifier followed by a dot and an object identifier.
32. Calling an object method requires using
(A) a class identifier followed by a dot and a method identifier.
(B) a method identifier followed by a dot and a class identifier.
(C) an object identifier followed by a dot and a method identifier.
(D) a method identifier followed by a dot and an object identifier.
13. 33. When is a constructor called?
(A) Each time the constructor identifier is used in a program statement
(B) During the instantiation of a new object
(C) During the construction of a new class
(D) At the beginning of any program execution
34. What is an overloaded constructor?
(A) A constructor with too many program statements.
(B) A second constructor with the same constructor heading as the first
constructor.
(C) A second constructor with a different identifier than the first constructor.
(D) A second or other multiple constructor with a different signature than any
other constructor.
35. Access to private data or private methods is
(A) restricted to methods of the same class.
(B) restricted to methods of other classes.
(C) available to methods of the same class and other classes.
(D) not an issue because the program will not compile.
36. A default constructor
(A) is a no-parameter method, which is called automatically during the
instantiation of a new object.
(B) is a parameter method, which is called automatically during the
instantiation of a new object.
(C) is a no-parameter method.
(D) is a parameter method.
37. A parameter constructor
(A) is a no-parameter method, which is called automatically during the
instantiation of a new object.
(B) is a parameter method, which is called automatically during the
instantiation of a new object.
(C) is a no-parameter method.
(D) is a parameter method.
38. Inheritance is the process of
(A) using classes in the established standard Java Language library.
(B) using features from an existing class.
14. (C) combining data and the methods, which process the data, inside the same
module.
(D) dividing a program into multiple related files for each class in the
program.
39. A class, which can use all the features of an established class, is
(A) a static class.
(B) a superclass.
(C) a subclass.
(D) overloaded.
40. An established class, whose members can all be used by a newly declared class, is
(A) a static class.
(B) a superclass.
(C) a subclass.
(D) overloaded.
41. Which identifier shows up both in the superclass and the subclass?
(A) The superclass identifier
(B) The subclass identifier
(C) The class identifier containing the main method
(D) The constructor identifier
42. A subclass has access to the data attributes of a superclass
(A) if the superclass data is declared protected.
(B) if the superclass data is declared private or protected.
(C) in all cases due to inheritance.
(D) only if the primary program class is declared public.
43. How is information passed from the subclass constructor to the superclass
constructor?
(A) The superclass constructor is automatically called before the subclass
constructor.
(B) Use the super keyword followed by a parameter list for the superclass.
(C) Use the super keyword followed by the superclass identifier.
(D) Use the new operator inside the subclass constructor to instantiate the
superclass.
44.. If a subclass has the same method identifier as a superclass method,
(A) a compile error message will result.
(B) a logic error will result.
15. (C) the superclass method will be used.
(D) the subclass method will be used.
45. Which of the following columns is the correct truth table for (A or B) and B ?
A B (A) (B) (C) (D) (E)
T T T T T F F
T F T F T F T
F T T T F T F
F F T F F T T
46. Which of the following columns is the correct truth table for (A or B) or A ?
A B (A) (B) (C) (D) (E)
T T T T T F T
T F T F F F T
F T T T F T T
F F T F F T F
47. The Boolean expression A >= B is equivalent to which of the following
expressions?
(A) not (A > B)
(B) not (B >= A)
(C) not (A < B)
(D) A != B
(E) A <= B
48. The Boolean expression A > B is equivalent to which of the following
expressions?
(A) not (B > A)
(B) not (A <= B)
(C) not (A != B)
(D) B>A
(E) B >= A
49. The Boolean expression (A and B) or A is true
(A) only when A is true.
(B) only when B is true.
(C) whenever either A is true or B is true.
(D) only whenever both A is true and B is true.
(E) for all values of A and B.
50. The Boolean expression (A && B) && !(A && B) evaluates to
16. (A) false in all cases.
(B) true in all cases.
(C) true whenever only A is true or only B is true.
(D) true whenever either A is true or B is true.
(E) true whenever both A is true and B is true.
51. The for loop is ideal for loop structures that
(A) repeat some process a fixed number of times.
(B) must execute some process at least one time.
(C) must check the loop condition before the loop body is executed.
(D) do all of the above.
52. The do..while loop is ideal for loop structures that
(A) repeat some process a fixed number of times.
(B) must execute some process at least one time.
(C) must check the loop condition before the loop body is executed.
(D) do all of the above.
53. What is the output of the program segment below?
int a, b;
a = some mystery int.
if (a > 100)
{
if (a < 50)
b = 1000;
else
b = 3000;
}
else
{
if (a > 150)
b = 2000;
else
b = 3000;
}
System.out.print(b);
(A) 1000
(B) 2000
17. (C) 3000
(D) The value of b cannot be determined without knowing the value of a.
54. What is the last output by the following program segment?
int x, y;
x = 1;
while (x < 3)
{
y = 1;
x++;
while (y < 3)
{
y++;
System.out.println(x + y);
}
}
(A) 4
(B) 5
(C) 6
(D) 7
55. How many ampersands (&) are displayed by the program segment below?
int n, p, q;
n = 5;
p = 1;
do
{
q = p;
while (q < n)
{
q += 2;
System.out.print("&");
}
p += 2;
}
while ( p < n);
18. (A) 1
(B) 2
(C) 3
(D) 5
56. Assume that you are writing a program, which will enter grades and average
them. You want this program to prevent the user from entering any grades that
are outside the range of [0..100]. Which of the following program segments will
only accept the desired input?
I. int grade
do
{
( prompt and get user input for grade )
}
while (grade < 0 || grade > 100);
II. int grade
do
{
( prompt and get user input for grade )
}
while ( !(grade < 0) || !(grade > 100) );
III. int grade
do
{
( prompt and get user input for grade )
}
while ( !(grade >= 0 && grade <= 100) );
(A) I only
(B) II only
(C) I & II only
(D) II and III only
(E) I and III only
57. Assume that you are executing a program segment, which repeats until user input
states to stop.
The user is prompted in some manner to enter 'Y', 'y', 'N' or 'n', where Y means
to repeat the
19. program segment and N means to stop execution. Which of the following
program segments will
only accept the desired input
I. char choice;
boolean ok;
do
{
( prompt user and get input for choice )
ok = (choice == 'Y' || choice == 'y' || choice == 'N' ||
choice == 'n');
}
while (!ok);
II. char choice;
boolean notOK;
do
{
( prompt user and get input for choice )
notOK = (choice != 'Y' && choice != 'y' && choice !=
'N' && choice != 'n');
}
while (notOK);
III. char choice;
boolean notOK;
do
{
( prompt user and get input for choice )
notOK = (choice != 'Y' || choice != 'y' || choice != 'N' ||
choice != 'n');
}
while (notOK);
(A) I only
(B) II only
(C) III only
(D) I and II only
(E) I, II and III
58. Computer colors are created with a combination of
____________________________ values.
20. (A) red, green and blue
(B) red, yellow and blue
(C) blue, green and yellow
(D) blue, green and white
59. An array is a
(A) data structure with one, or more, elements of the same type.
(B) data structure with LIFO access.
(C) data structure, which allows transfer between internal and external storage.
(D) data structure with one, or more, elements, called fields, of the same or
different data types.
60. Consider the program segment below.
int list[];
list = new int[100];
How many integers can be stored in the list array
(A) 99
(B) 100
(C) 101
(D) 100 initial integers plus any additional integers required during program
execution
61. Consider the two program segments below.
Segment1 Segment2
int list[]; list[] = new int[100];
list = new int[100];
Which of the following is a true statement about the comparison of Segment1 and
Segment2?
(A) Segment1 declares list correctly. Segment2 declares list incorrectly.
(B) Segment1 declares list incorrectly. Segment2 declares list correctly.
(C) Both Segment1 and Segment2 declare list correctly.
(D) Both Segment1 and Segment2 declare list incorrectly.
62. What is the output of program Java1314.java below.
public class Java1314
21. {
public static void main(String args[])
{
int list[] = {1,2,3,4,5};
for (int k = 1; k < list.length; k++)
System.out.println("list[" + k + "] = " + list[k]);
}
}
(A) list[0] = 0
list[1] = 1
list[2] = 2
list[3] = 3
list[4] = 4
(B) list[0] = 1
list[1] = 2
list[2] = 3
list[3] = 4
list[4] = 5
(C) list[1] = 1
list[2] = 2
list[3] = 3
list[4] = 4
list[5] = 5
(D) list[1] = 2
list[2] = 3
list[3] = 4
list[4] = 5
(E) Compile Error
63. What is the output of the program below?
public class Java1326
{
public static void main(String args[])
{
int matrix[ ][ ];
matrix = new int[3][4];
for(int p = 0; p < 3; p++)
{
22. for(int q = 0; q < 4; q++)
System.out.print(matrix[p][q] + " ");
System.out.println();
}
System.out.println();
}
}
(A) 0 0 0 0 (B) 0 0 0 (C) 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0
(D) Compile Error
64. What is the output of the program below?
public class Java1327
{
public static void main(String args[])
{
int matrix[ ][ ];
matrix = new int[3][4];
for(int p = 0; p < 3; p++)
{
for(int q = 0; q < 4; q++)
System.out.print(matrix[q][p] + " ");
System.out.println();
}
System.out.println();
}
}
(A) 0 0 0 0 (B) 0 0 0 (C) 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0
(D) Error message
65. __________ is the principle of breaking up a program into smaller, manageable
program modules.
23. (A) Encapsulation
(B) Inheritance
(C) Polymorphism
(D) Divide and conquer
66. A class
(A) is a user-defined data type.
(B) combines both data and the methods that act upon the data in the same
module.
(C) is one instance of a more general data type.
(D) is both A and B.
67. An object
(A) is a user-defined data type.
(B) combines both data and the methods that act upon the data.
(C) is one instance of a more general data type.
(D) is both A and B.
68. The data in a class are also called
(A) attributes.
(B) instance variables.
(C) fields.
(D) all of the above.
69. Methods are
(A) action modules that process data.
(B) class variables that store information.
(C) instances of a class.
(D) none of the above.
70. Instantiation is the moment that
(A) memory is allocated for a specific object of a class.
(B) memory is allocated for a specific object, which is a member of a class.
(C) a program is ready for execution.
(D) a program compiles correctly.
71. Object Oriented Programming is characterized by using
(A) encapsulation.
(B) inheritance.
(C) polymorphism.
24. (D) all of the above.
72. A constructor is
(A) a method with the same identifier as the class identifier.
(B) neither a void method nor a return method.
(C) called during the instantiation of a new object.
(D) all of the above.
73. The scope of an object is the
(A) size of the memory allocated for an object.
(B) total number of data attributes used by an object.
(C) range of accessing member methods.
(D) period during which an object is defined and allocates memory to store
values.
74. When simple data types are used for parameter passing,
(A) the actual current value of the simple data type's variable is copied.
(B) the initial value of the simple data type's variable is copied.
(C) the memory reference where the variable values are stored is copied.
(D) a new object of the data type is instantiated.
75. When objects are used for parameter passing,
(A) the current values of the data attributes of the object are copied.
(B) the initial values of the object instantiation information are copied.
(C) the memory reference where the object information is stored is copied.
(D) a new object of the same class as the parameter object is instantiated.
76. Information hiding is the concept of
(A) declaring all significant data as private.
(B) storing information in private data fields.
(C) thinking about programming features without concern about the
implementation of these features.
(D) testing a program without using any actual data.
77. The creation of a String object
(A) requires the new operator.
(B) can be done with or without the new operator.
(C) is always done without the new operator.
(D) requires using the new operator as well as one String parameter.
25. 78. Which of the following declarations is correct?
I. String s1 = "Mambo";
II. String s2;
s2 = "Mambo";
III. String s3 = new String("Mambo");
(A) I only
(B) I and II only
(C) II and III only
(D) I, II and III
79. What information will be stored in string3 as a result of the statement below?
String string3 = "100" + "200";
(A) The String value "100200"
(B) The int value 100200
(C) The int value 300
(D) The String value "300"
80. Assume that s1, s2 and s3 are String objects. Which statement(s) demonstrate(s)
string concatenation?
(A) s1 = s2.concat("Hello");
(B) s3 = s1 + s2;
(C) concat(s1,s2);
(D) Both A and B
81. Consider the linearSearch method below.
public boolean linearSearch(int searchNumber)
{
boolean found = false;
for (int k = 0; k < intArray.length; k++)
if (intArray[k] == searchNumber)
found = true;
return found;
}
Why is this implementation of the Linear Search algorithm is considered
undesirable?
26. (A) Searching will continue after a match for searchNumber is found.
(B) It will only return the correct result if the last array element is the
searchNumber.
(C) It will only return the correct result if the first array element is the
searchNumber.
(D) It will return the wrong result if the searchNumber is not found.
82. Consider method whatSort below.
public void whatSort()
{
for (int q = 0; q < intArray.length-1; q++)
if ( intArray[q] > intArray[q+1])
{
int temp = intArray[q];
intArray[q] = intArray[q+1];
intArray[q+1] = temp;
}
}
Assume that intArray stores a random list of integers prior to calling whatSort.
How will the
Integers be arranged after a call to whatSort?
(A) Data will be arranged in ascending order.
(B) Data will be arranged in descending order.
(C) The largest integer will be stored in the last array element.
(D) The smallest integer will be stored in the first array element.
83. Consider method whatSort below.
public void whatSort()
{
for (int p = 1; p < intArray.length; p++)
for (int q = 0; q < intArray.length-p; q++)
if ( intArray[q] > intArray[q+1])
{
int temp = intArray[q];
intArray[q] = intArray[q+1];
intArray[q+1] = temp;
}
}
Assume that intArray stores a random list of integers prior to calling whatSort.
How will the
Integers be arranged after a call to whatSort?
27. (A) Data will be arranged in ascending order.
(B) Data will be arranged in descending order.
(C) The largest integer will be stored in last array element.
(D) The smallest integer will be stored in the first array element.
84. Assume that index represents the array location where a new array elements needs
to be deleted or an
existing array element needs to be deleted. Variable size represents the number of
elements
in intArray. Consider method whichOne below.
public void whichOne(int index, int number)
{
for (int k = size-1; k > index; k--)
intArray[k] = intArray[k-1];
intArray[index] = number;
}
Method whichOne
(A) deletes number from the array.
(B) inserts number into the array.
(C) either deletes number or inserts number; it depends on how method
whichOne is called.
(D) either deletes number or inserts number; it depends on the value of index.
85. Assume that index represents the array location where a new array elements needs
to be deleted or an
existing array element needs to be deleted. Variable size represents the number of
elements
in intArray. Consider method whichOne below.
public void whichOne(int index, int number)
{
for (int k = index; k < size-1; k++)
intArray[k] = intArray[k+1];
size--;
}
Method whichOne
(A) deletes number from the array.
(B) inserts number into the array.
(C) either deletes number or inserts number; it depends on how whichOne is
called.
28. (D) either deletes number or inserts number; it depends on the value of index.
86. How does the Selection Sort compare to the Bubble Sort in execution efficiency?
(A) The Selection Sort is always faster than the Bubble Sort.
(B) The Bubble Sort is always faster than the Selection Sort.
(C) The Selection Sort is usually faster than the Bubble Sort with random
data.
(D) The Selection Sort is only faster than the Bubble Sort with sorted data.
87. Consider method selectionSort below. Assume that method swap exists, which
swaps the array
elements of intArray according to the provided index parameters.
public void selectionSort()
{
for (int p = 0; p < intArray.length-1; p++)
{
int temp = p;
for (int q = p+1; q < intArray.length; q++)
if (intArray[q] < intArray[temp])
temp = q;
if (intArray[p] != intArray[temp])
swap(p,temp);
}
}
Assume that intArray stores a random list of integers prior to calling
selectionSort. How will the
Integers be arranged after a call to selectionSort?
(A) Data will be arranged in ascending order.
(B) Data will be arranged in descending order.
(C) The largest integer will be stored in last array element.
(D) The smallest integer will be stored in the first array element.
88. Consider method selectionSort below. Assume that method swap exists, which
swaps the array
elements of intArray according to the provided index parameters.
public void selectionSort()
{
for (int p = 0; p < intArray.length-1; p++)
{
int temp = p;
for (int q = p+1; q < intArray.length; q++)
29. if (intArray[q] > intArray[temp])
temp = q;
if (intArray[p] != intArray[temp])
swap(p,temp);
}
}
Assume that intArray stores a random list of integers prior to calling
selectionSort. How will the
Integers be arranged after a call to selectionSort?
(A) Data will be arranged in ascending order.
(B) Data will be arranged in descending order.
(C) The largest integer will be stored in last array element.
(D) The smallest integer will be stored in the first array element.
89. How does the Selection Sort behave after all the data is sorted in an array?
(A) It stops making comparisons, just like the Smart Bubble Sort.
(B) The Regular Selection Sort continues sorting; the Smart Selection Sort
stops.
(C) The Selection Sort continues to make comparisons until every comparison
pass is finished.
(D) If the data is sorted already, the Selection Sort never starts, otherwise it
executes every loop.
90. Is the Binary Search always preferred over the Linear Search, and why?
(A) Yes, because the Binary Search is always faster than the Linear Search.
(B) Yes, because the Binary Search can search any type of data.
(C) No, because the Linear Search is faster than the Binary Search with sorted
data.
(D) No, because the Binary Search only works with sorted data, unlike the
Linear Search.
91. Assume that intArray contains the following set of sorted integers.
{100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200}
How many comparisons are made by a Binary Search method to find number
130?
(A) 2
(B) 3
(C) 4
(D) 5
30. 92. Assume that intArray contains the following set of sorted integers.
{11,22,33,44,55,66,77,88,99}
How many comparisons are made by a Binary Search method to determine that
number 50
is not in the list?
(A) 2
(B) 3
(C) 4
(D) 5
93. Which of the following statements is a/are fundamental recursion concept(s)?
(A) All recursive methods require an exit or base case.
(B) Every method call will be completed, even if interrupted by another
recursive call.
(C) Incomplete recursive calls are executed in a LIFO sequence.
(D) All of the above
94. Consider the count method below.
Public static void count(int a, int b)
{
if (a <= b)
{
System.out.print(a + " ");
Count(a+1, b);
}
}
What will be displayed by the method call count(10,20)?
(A) 10 11 12 13 14 15 16 17 18 19 20
(B) 11 12 13 14 15 16 17 18 19 20
(C) 20 19 18 17 16 15 14 13 12 11 10
(D) 20 19 18 17 16 15 14 13 12 11
95. Consider the count method below.
Public static void count(int a, int b)
{
if (a <= b)
{
31. count(a+1, b);
System.out.print(a + " ");
}
}
What will be displayed by the method call count(10,20)?
(A) 10 11 12 13 14 15 16 17 18 19 20
(B) 11 12 13 14 15 16 17 18 19 20
(C) 20 19 18 17 16 15 14 13 12 11 10
(D) 20 19 18 17 16 15 14 13 12 11
96. What value will be returned by the call m09(5) ?
public static int m09 (int n)
{
if (n == 1)
return 25;
else
return m09(n-1);
}
(A) 1
(B) 5
(C) 25
(D) 125
97. What value will be returned by the call m10(5) ?
public static int m10 (int n)
{
if (n == 1)
return 25;
else
return n + m10(n-1);
}
(A) 5
(B) 39
(C) 125
(D) 195
98. What value will be returned by the call m11(1) ?
public static int m11(int n)
{
32. if (n == 5)
return 0;
else
return n + m11(n+1);
}
(A) 1
(B) 10
(C) 50
(D) 75
99. What value will be returned by the call m13(5) ?
public static int m13 (int n)
{
if (n == 1)
return 1;
else
return n * m13(n-1);
}
(A) 5
(B) 20
(C) 24
(D) 120
100. What value will be returned by the call m14(5,6)?
public static int m14 (int a, int b)
{
if (a == 0)
return 0;
else
return b + m14(a-1,b);
}
(A) 1
(B) 11
(C) 30
(D) 120