This document discusses functions in JavaScript and provides examples. It begins with a summary of grade distributions from two in-class coding exercises. It then covers key concepts about functions including their benefits of modularity and reusability. Examples are provided of built-in functions from the core, browser, and DOM APIs. The document also discusses user-defined functions in JavaScript including named function declarations, anonymous functions, parameters, return values, and variable scopes. Code examples are included to demonstrate different function definition techniques.
The document discusses the basic elements of a Java program, including methods, identifiers, data types, expressions, input/output statements, and packages. It covers primitive data types like int and float, arithmetic operators, strings, variables, and how to write a simple Java application program. The chapter objectives are to familiarize readers with these core programming concepts in Java.
Solutions manual for c++ programming from problem analysis to program design ...Warren0989
Solutions Manual for C++ Programming From Problem Analysis to Program Design 8th Edition by Malik IBSN 9781337102087
Download at: https://goo.gl/nxo13w
People also search:
c++ programming from problem analysis to program design 7th edition pdf
c++ programming malik 8th edition pdf
c++ programming from problem analysis to program design 8th edition pdf download
c++ programming from problem analysis to program design exercise answers
c++ programming from problem analysis to program design solution manual
c++ programming program design including data structures 7th edition pdf download
c++ programming from problem analysis to program design 6th edition pdf
c++ programming from problem analysis to program design 7th edition solution manual
The document discusses chapters 4 and 5 from a C++ programming textbook. Chapter 4 covers selection control structures like if/else statements and relational operators. Chapter 5 discusses repetition control structures like while, for, and do-while loops. The document provides examples and explanations of how to use these different control structures in C++ programs. It also discusses logical operators, order of precedence, switch statements, nested control structures, and the break and continue statements.
C# (pronounced “see sharp” or “C Sharp”) is one of many .NET programming languages. It is object-oriented and allows you to build reusable components for a wide variety of application types Microsoft introduced C# on June 26th, 2000 and it became a v1.0 product on Feb 13th 2002
This document provides information about the Programming in C course offered at Government Polytechnic, Mumbai. It discusses the rationale for learning C programming, outlines the course outcomes, and details the course content, teaching scheme, examination scheme, list of experiments and assignments, and references. The course aims to teach students fundamental C programming concepts like algorithms, data types, control structures, functions, pointers, and help students develop the ability to write programs to solve real-world problems.
This document provides information about the Programming in C course offered at Government Polytechnic, Mumbai. It discusses the rationale for learning C programming, outlines the course outcomes which focus on developing algorithms and programming concepts in C. The course content is divided into 7 units covering topics such as program logic, basics of C, control structures, arrays, structures, functions, and pointers. 15 experiments/assignments are listed to provide hands-on practice of the concepts. References for further reading are also included. The document was prepared by an internal and external faculty committee from Government Polytechnic, Mumbai.
This document summarizes key concepts from an introduction to C++ programming chapter, including:
- The main parts of a C++ program are comments, preprocessor directives, the main() function, and statements.
- Variables are used to store and manipulate data in a program. Variables are declared with a name and type before use.
- Arithmetic operators allow performing calculations in C++ programs. Expressions follow order of operations rules.
- Input and output streams allow getting user input and displaying output to the screen.
The document discusses the basic elements of a Java program, including methods, identifiers, data types, expressions, input/output statements, and packages. It covers primitive data types like int and float, arithmetic operators, strings, variables, and how to write a simple Java application program. The chapter objectives are to familiarize readers with these core programming concepts in Java.
Solutions manual for c++ programming from problem analysis to program design ...Warren0989
Solutions Manual for C++ Programming From Problem Analysis to Program Design 8th Edition by Malik IBSN 9781337102087
Download at: https://goo.gl/nxo13w
People also search:
c++ programming from problem analysis to program design 7th edition pdf
c++ programming malik 8th edition pdf
c++ programming from problem analysis to program design 8th edition pdf download
c++ programming from problem analysis to program design exercise answers
c++ programming from problem analysis to program design solution manual
c++ programming program design including data structures 7th edition pdf download
c++ programming from problem analysis to program design 6th edition pdf
c++ programming from problem analysis to program design 7th edition solution manual
The document discusses chapters 4 and 5 from a C++ programming textbook. Chapter 4 covers selection control structures like if/else statements and relational operators. Chapter 5 discusses repetition control structures like while, for, and do-while loops. The document provides examples and explanations of how to use these different control structures in C++ programs. It also discusses logical operators, order of precedence, switch statements, nested control structures, and the break and continue statements.
C# (pronounced “see sharp” or “C Sharp”) is one of many .NET programming languages. It is object-oriented and allows you to build reusable components for a wide variety of application types Microsoft introduced C# on June 26th, 2000 and it became a v1.0 product on Feb 13th 2002
This document provides information about the Programming in C course offered at Government Polytechnic, Mumbai. It discusses the rationale for learning C programming, outlines the course outcomes, and details the course content, teaching scheme, examination scheme, list of experiments and assignments, and references. The course aims to teach students fundamental C programming concepts like algorithms, data types, control structures, functions, pointers, and help students develop the ability to write programs to solve real-world problems.
This document provides information about the Programming in C course offered at Government Polytechnic, Mumbai. It discusses the rationale for learning C programming, outlines the course outcomes which focus on developing algorithms and programming concepts in C. The course content is divided into 7 units covering topics such as program logic, basics of C, control structures, arrays, structures, functions, and pointers. 15 experiments/assignments are listed to provide hands-on practice of the concepts. References for further reading are also included. The document was prepared by an internal and external faculty committee from Government Polytechnic, Mumbai.
This document summarizes key concepts from an introduction to C++ programming chapter, including:
- The main parts of a C++ program are comments, preprocessor directives, the main() function, and statements.
- Variables are used to store and manipulate data in a program. Variables are declared with a name and type before use.
- Arithmetic operators allow performing calculations in C++ programs. Expressions follow order of operations rules.
- Input and output streams allow getting user input and displaying output to the screen.
The document discusses creating forms and adding controls in Visual Studio using C#. It describes how to create a Windows Forms application project, add buttons, labels, and textboxes to forms using the toolbox, and name controls. It also covers correcting errors, deciding between console and GUI interfaces, and providing functionality for buttons by writing code in the button click event handler.
This chapter discusses various techniques for making decisions in code, including using if/else statements to handle single and dual alternative decisions, switch statements to test a variable against multiple cases, and logical operators like && and ||. It also covers avoiding common errors, performing efficient range checks, and applying decision making concepts in graphical user interface programs.
The document discusses data types and variables in C#, including integral types like int and float, arithmetic operators, constants, strings, and accepting user input. It covers declaring and displaying variables, implicit and explicit casting between types, and defining enumerations and constants. The objectives are to learn how to declare and manipulate different data types, perform calculations, accept user input, and define named values that cannot change.
This chapter discusses using methods in C# programs. It covers writing methods with no parameters and return value, methods that require single or multiple arguments, and methods that return values. The chapter also discusses passing arrays to methods, alternate Main method headers, and considerations for using methods in GUI programs.
This document discusses methods in C# programming. It begins with an introduction to methods and their use for modularizing programs into self-contained units. It then covers defining and calling methods, including specifying return types, parameters, and access modifiers. Examples are provided of common math methods and defining custom methods to calculate taxes, add values, and find maximum values. Common errors related to method definitions and usage are also listed.
C# - Constants and Literals. The constants refer to fixed values that the program may not alter during its execution. These fixed values are also called literals. Constants can be of any of the basic data types like an integer constant, a floating constant, a character constant, or a string literal.
The document discusses key concepts in programming and C#, including:
1) The differences between procedural and object-oriented programming, and features of OOP like classes and objects.
2) How to write and compile a basic C# program that uses Console.WriteLine() to output text.
3) Tips for writing high-quality code like adding comments, selecting identifiers, and using namespaces.
This document discusses advanced method concepts in C# including parameter types, overloading methods, avoiding ambiguous methods, and using optional parameters. It covers reference and output parameters that allow a method to modify the original passed variable, parameter arrays that allow an unknown number of arguments, and overloading methods by writing multiple methods with the same name but different parameter lists. It also discusses avoiding ambiguous methods, using optional parameters by supplying default values, and how named and optional arguments affect overload resolution.
The document discusses arrays in C#, including how to declare and assign values to array elements, initialize arrays, access array elements using indexes, search arrays using loops, and use built-in array methods like BinarySearch(), Sort(), and Reverse(). It also covers multidimensional arrays and issues with arrays in GUI programs.
This document discusses chapter 9 of the book "Microsoft Visual C# 2010, Fourth Edition" which covers using classes and objects in C#. It provides objectives for the chapter which include creating classes, objects, properties, constructors, and overloading constructors. It also discusses concepts like the this reference, passing objects to methods, and using object initializers to assign values when instantiating objects.
Duplicate Code Detection using Control StatementsEditor IJCATR
Code clone detection is an important area of research as reusability is a key factor in software evolution. Duplicate code degrades the design and structure of software and software qualities like readability, changeability, maintainability. Code clone increases the maintenance cost as incorrect changes in copied code may lead to more errors. In this paper we address structural code similarity detection and propose new methods to detect structural clones using structure of control statements. By structure we mean order of control statements used in the source code. We have considered two orders of control structures: (i) Sequence of control statements as it appears (ii) Execution flow of control statements.
Visualizing UML’s Sequence and Class Diagrams Using Graph-Based Clusters Nakul Sharma
This paper proposes a new methodology to generate UML class and sequence diagrams from source code and class files using a graph-based clustering approach. It performs keyphrase extraction from source code comments, constructs a source code dependency graph (SDG) based on contextual similarity, and clusters related documents together. Finally, it creates UML diagrams from the filtered top clusters. An analysis of existing UML diagram generation techniques is also provided. The proposed approach is useful for software maintenance engineers and developers to understand project structure for large open source projects.
The document discusses the design and implementation of the second pass of a two-pass assembler. It explains that a two-pass assembler handles forward references easily by building a symbol table in the first pass and then using it to synthesize the target program in the second pass. The first pass constructs an intermediate representation using the symbol table, which the second pass then processes to generate the target code. The algorithm for the second pass is described, which involves processing the intermediate representation and writing the target code to an output file.
The document provides information about C language and its features. It discusses that C was developed by Dennis Ritchie in 1972 and is a general purpose programming language well suited for business and scientific applications. It also summarizes the basic structure of a C program and describes various C language components like data types, operators, and conditional statements.
The document outlines the course plan for Programming in C at Punjab College of Technical Education in Ludhiana, including topics to be covered such as fundamentals of C, control statements, functions, arrays, structures, pointers, and file handling, along with assignments, tests, references, and sample programs for students. It provides details on the teacher, course code, number of lectures and assignments, topics, schedule, assessments, references, and sample programs for practice.
The document discusses Unit 4 of the Programming for Problem Solving course. It covers functions and pointers in C programming. Specifically, it discusses function declaration, definition, user-defined functions, storage classes, function prototypes, parameter passing methods (call by value and call by reference), recursion, pointers, pointer arithmetic, and dynamic memory allocation using pointers.
This document discusses the C programming language and data structures. It covers the basic structure of C programs, including functions, main functions, and sections like documentation, definitions, declarations, and subprograms. It also discusses basic C programs, data types, operators, control structures, arrays, pointers, structures, unions, and file I/O. The document is intended to introduce students to C language concepts and data structures.
The document discusses the process of programming which involves designing algorithms using pseudo code or flow charts, writing program codes using statements, and having an interpreter like a browser execute the code. It introduces key concepts like the 6 essential statements (input, output, declaration, assignment, decision, loop), algorithm representations and components of pseudo code and flow charts, and the programming process from objectives to coding to interpretation.
The document discusses the C programming language and data structures. It covers the basic structure of C programs, data types, operators, control flow statements, arrays, strings, functions, pointers, structures, unions and file I/O. The chapters are outlined and key concepts like algorithms, flowcharts and program development steps are explained in detail. The history and evolution of C language is presented along with its features, applications and importance. A simple C program example is also provided and analyzed.
This document outlines a course on C programming for third semester diploma students in computer engineering in Tamil Nadu, India. It provides details of the course code, teaching scheme, topics covered, objectives, syllabus, textbooks, and contents. The course aims to teach basic C programming concepts such as variables, data types, operators, decision making, arrays, strings, functions, structures, unions, pointers, file management, and preprocessors. It is a core course that will help students develop programming skills and serve as a foundation for other subjects. The course covers 75 hours of instruction over 15 weeks and includes internal and board examinations.
The document discusses creating forms and adding controls in Visual Studio using C#. It describes how to create a Windows Forms application project, add buttons, labels, and textboxes to forms using the toolbox, and name controls. It also covers correcting errors, deciding between console and GUI interfaces, and providing functionality for buttons by writing code in the button click event handler.
This chapter discusses various techniques for making decisions in code, including using if/else statements to handle single and dual alternative decisions, switch statements to test a variable against multiple cases, and logical operators like && and ||. It also covers avoiding common errors, performing efficient range checks, and applying decision making concepts in graphical user interface programs.
The document discusses data types and variables in C#, including integral types like int and float, arithmetic operators, constants, strings, and accepting user input. It covers declaring and displaying variables, implicit and explicit casting between types, and defining enumerations and constants. The objectives are to learn how to declare and manipulate different data types, perform calculations, accept user input, and define named values that cannot change.
This chapter discusses using methods in C# programs. It covers writing methods with no parameters and return value, methods that require single or multiple arguments, and methods that return values. The chapter also discusses passing arrays to methods, alternate Main method headers, and considerations for using methods in GUI programs.
This document discusses methods in C# programming. It begins with an introduction to methods and their use for modularizing programs into self-contained units. It then covers defining and calling methods, including specifying return types, parameters, and access modifiers. Examples are provided of common math methods and defining custom methods to calculate taxes, add values, and find maximum values. Common errors related to method definitions and usage are also listed.
C# - Constants and Literals. The constants refer to fixed values that the program may not alter during its execution. These fixed values are also called literals. Constants can be of any of the basic data types like an integer constant, a floating constant, a character constant, or a string literal.
The document discusses key concepts in programming and C#, including:
1) The differences between procedural and object-oriented programming, and features of OOP like classes and objects.
2) How to write and compile a basic C# program that uses Console.WriteLine() to output text.
3) Tips for writing high-quality code like adding comments, selecting identifiers, and using namespaces.
This document discusses advanced method concepts in C# including parameter types, overloading methods, avoiding ambiguous methods, and using optional parameters. It covers reference and output parameters that allow a method to modify the original passed variable, parameter arrays that allow an unknown number of arguments, and overloading methods by writing multiple methods with the same name but different parameter lists. It also discusses avoiding ambiguous methods, using optional parameters by supplying default values, and how named and optional arguments affect overload resolution.
The document discusses arrays in C#, including how to declare and assign values to array elements, initialize arrays, access array elements using indexes, search arrays using loops, and use built-in array methods like BinarySearch(), Sort(), and Reverse(). It also covers multidimensional arrays and issues with arrays in GUI programs.
This document discusses chapter 9 of the book "Microsoft Visual C# 2010, Fourth Edition" which covers using classes and objects in C#. It provides objectives for the chapter which include creating classes, objects, properties, constructors, and overloading constructors. It also discusses concepts like the this reference, passing objects to methods, and using object initializers to assign values when instantiating objects.
Duplicate Code Detection using Control StatementsEditor IJCATR
Code clone detection is an important area of research as reusability is a key factor in software evolution. Duplicate code degrades the design and structure of software and software qualities like readability, changeability, maintainability. Code clone increases the maintenance cost as incorrect changes in copied code may lead to more errors. In this paper we address structural code similarity detection and propose new methods to detect structural clones using structure of control statements. By structure we mean order of control statements used in the source code. We have considered two orders of control structures: (i) Sequence of control statements as it appears (ii) Execution flow of control statements.
Visualizing UML’s Sequence and Class Diagrams Using Graph-Based Clusters Nakul Sharma
This paper proposes a new methodology to generate UML class and sequence diagrams from source code and class files using a graph-based clustering approach. It performs keyphrase extraction from source code comments, constructs a source code dependency graph (SDG) based on contextual similarity, and clusters related documents together. Finally, it creates UML diagrams from the filtered top clusters. An analysis of existing UML diagram generation techniques is also provided. The proposed approach is useful for software maintenance engineers and developers to understand project structure for large open source projects.
The document discusses the design and implementation of the second pass of a two-pass assembler. It explains that a two-pass assembler handles forward references easily by building a symbol table in the first pass and then using it to synthesize the target program in the second pass. The first pass constructs an intermediate representation using the symbol table, which the second pass then processes to generate the target code. The algorithm for the second pass is described, which involves processing the intermediate representation and writing the target code to an output file.
The document provides information about C language and its features. It discusses that C was developed by Dennis Ritchie in 1972 and is a general purpose programming language well suited for business and scientific applications. It also summarizes the basic structure of a C program and describes various C language components like data types, operators, and conditional statements.
The document outlines the course plan for Programming in C at Punjab College of Technical Education in Ludhiana, including topics to be covered such as fundamentals of C, control statements, functions, arrays, structures, pointers, and file handling, along with assignments, tests, references, and sample programs for students. It provides details on the teacher, course code, number of lectures and assignments, topics, schedule, assessments, references, and sample programs for practice.
The document discusses Unit 4 of the Programming for Problem Solving course. It covers functions and pointers in C programming. Specifically, it discusses function declaration, definition, user-defined functions, storage classes, function prototypes, parameter passing methods (call by value and call by reference), recursion, pointers, pointer arithmetic, and dynamic memory allocation using pointers.
This document discusses the C programming language and data structures. It covers the basic structure of C programs, including functions, main functions, and sections like documentation, definitions, declarations, and subprograms. It also discusses basic C programs, data types, operators, control structures, arrays, pointers, structures, unions, and file I/O. The document is intended to introduce students to C language concepts and data structures.
The document discusses the process of programming which involves designing algorithms using pseudo code or flow charts, writing program codes using statements, and having an interpreter like a browser execute the code. It introduces key concepts like the 6 essential statements (input, output, declaration, assignment, decision, loop), algorithm representations and components of pseudo code and flow charts, and the programming process from objectives to coding to interpretation.
The document discusses the C programming language and data structures. It covers the basic structure of C programs, data types, operators, control flow statements, arrays, strings, functions, pointers, structures, unions and file I/O. The chapters are outlined and key concepts like algorithms, flowcharts and program development steps are explained in detail. The history and evolution of C language is presented along with its features, applications and importance. A simple C program example is also provided and analyzed.
This document outlines a course on C programming for third semester diploma students in computer engineering in Tamil Nadu, India. It provides details of the course code, teaching scheme, topics covered, objectives, syllabus, textbooks, and contents. The course aims to teach basic C programming concepts such as variables, data types, operators, decision making, arrays, strings, functions, structures, unions, pointers, file management, and preprocessors. It is a core course that will help students develop programming skills and serve as a foundation for other subjects. The course covers 75 hours of instruction over 15 weeks and includes internal and board examinations.
This document discusses variables, values, and expressions in JavaScript. It begins with an overview of the topics that will be covered in Module 3, including declaring variables, data types, arithmetic operators, and precedence. It then provides more detailed explanations and examples of variables (concepts, declarations, and scope), values (number, Boolean, string, object types), and expressions (concepts and operators). The document emphasizes that in programming, it is all about data - how data is stored in variables, the types of data values, and how data is manipulated through expressions. It includes examples to test and exercises to understand these key concepts for declaring and working with variables, values, and expressions in JavaScript.
Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :
help.mbaassignments@gmail.com
or
call us at : 08263069601
Notes of c programming 1st unit BCA I SEMMansi Tyagi
This document discusses the basics of the C programming language. It covers the structure of a basic C program, which must include a main function with declaration and executable parts. C tokens like keywords, identifiers, constants, operators and strings are also introduced. The document then discusses C program development steps like understanding the problem, planning input/output, designing an algorithm, coding, testing and debugging. It provides a high-level overview of the C language and programming in C.
This document provides information about the Programming in C course offered at Government Polytechnic, Mumbai. It discusses the rationale for learning C programming, outlines the course outcomes, and details the course content, teaching scheme, examination scheme, list of experiments, and references. The key topics covered include program logic development, basics of C programming, control structures, arrays and strings, structures and unions, functions, and pointers. The goal is for students to develop skills in writing C programs using these fundamental programming concepts.
Problem Solving Techniques and Introduction to CPrabu U
This document provides an overview of problem solving techniques, programs, and the program development cycle. It discusses:
1. The steps of problem solving techniques include defining the problem, formulating a mathematical model, developing an algorithm using a flowchart or pseudocode, writing code, and testing the program.
2. A program consists of a series of instructions and fixed data to perform required operations. The program development cycle involves problem analysis, design, coding, compilation and execution, debugging and testing, and documentation.
3. An algorithm is a finite sequence of steps to solve a problem. Flowcharts use graphical symbols to represent the steps of an algorithm and show the program logic through connections between these symbols.
The document outlines the program structure for the second year of engineering at the University of Mumbai for semesters 3 and 4. It includes details of the courses, teaching scheme, examination scheme, labs, and syllabus. Some of the key courses include Data Structures, Database Management Systems, Principles of Communication, and Paradigms and Computer Programming Fundamentals. The syllabus covers topics like Java fundamentals, OOP concepts, inheritance, packages, interfaces, exception handling, multithreading, I/O streams, and GUI programming using AWT and Swing. Students will complete labs related to the coursework and a mini project to develop a front-end or backend application using Java.
This document provides an overview of Visual Basic 6.0 and how to create a basic application. It outlines the objectives of learning Visual Basic and describes key concepts like the event-driven nature of VB applications. The document explains the structure of a VB project, including forms, controls, properties, methods and events. It also demonstrates how to set control properties, write code, declare variables, and use common functions and operators. Finally, it provides examples for creating a stopwatch timer application and a basic text editor application in VB.
The document outlines the topics covered in an introductory Visual Basic for Applications (VBA) course for Microsoft Access. The 3-hour sessions cover event-driven programming in Access, VBA language constructs and programming techniques, and working programmatically with data. Key concepts discussed include using the VBA editor, differentiating between functions and sub procedures, variable scope, and built-in VBA functions. Interactive exercises are provided to help learn organizing code and using functions.
Lecture 3.2.4 C pointer to Structure.pptxravi2692kumar
Enabling immediate and 24/7 communication
Automating communication
Overcoming geographical barriers
Enabling more effective and real-time collaboration
Increasing transparency
Decentralizing decision making
Agar, J., 2003. Constant Touch: A Global History of the Mobile Phone. Cambridge: Icon Books.
Barry, W., 1999. Networks in the Global Village. Boulder Colo: Westview Press.
Caron, A, & Caronia, L., 2007. Moving cultures: mobile communication in everyday life. Montreal: McGill-Queen’s University Press.
Castells, M., 1996. The Information Age: Economy, Society and Culture, Volume 1.The Rise of the Network Society. Oxford: Blackwell.
Daniel, C., & Rod, M., 2011.The Dictionary of Media and Communications. Oxford: Oxford University Press.
Many of the business processes today involve communications like messaging/chatbots, email marketing, and social media engagement to reach out to the target customers. The growth and widespread adoption of social media platforms, video conferencing tools and emailing platforms have made virtual communication a new normal in the COVID reign
Postman, N., 1992. Technopoly: The surrender of culture to technology. New York: Vintage Books.
Reid, D. J. & Reid F. J. M., 2004. Insights into the Social and Psychological Effects of SMS Text Messaging. Web.
Richard, L., 2004. The Mobile Connection: The Cell Phone’s Impact on Society. San Francisco Morgan: Kaufmann.
Soukup, C., 2008. ‘Magic Screens: Everyday Life in an Era of Ubiquitous and Mobile Media Screens’, presented at 94th annual Convention. San Diego.
Stephen, J., 1997. Interface Culture: How New Technology Transforms the Way We Create and Communicate. San Francisco: Basic Books.
Tofts, D., 1997. ‘The technology within’ in memory trade: A Prehistory of Cyberculture, North Ryde: 21C Books.
The document provides details of courses on Programming in C and C Lab, Web Design and Web Design Lab, and Computer Organization and Architecture.
It outlines 5 units for Programming in C covering algorithm development, data types, control statements, arrays, strings, pointers, functions, structures, files and command line arguments. It also outlines 14 experiments to be completed in the C Lab course.
The Web Design course covers HTML, CSS, JavaScript, XML, and Flash MX across 5 units. The Web Design Lab course lists 21 experiments involving creating web pages and applications using these technologies.
Finally, the Computer Organization and Architecture course covers 5 units on digital logic circuits, digital components, basic computer organization, complete computer
The document provides an overview of macros, pivot tables, and the VLOOKUP function in Excel as practical analytical tools. It defines each tool, explains how they work and are used, and provides examples. It concludes with practice exercises for readers to record macros, create pivot tables, and use the VLOOKUP function with sample data.
ERP Magazine is a monthly publication focusing on ERP/SAP software technical insights and innovations, for both new and advanced learners. In every issue, leading authors and consultants from a diverse set of companies present their ideas and/or achievements in a clear fashion. Each article is carefully reviewed both by technical and English-language experts. The graphics are rich in content and visual style, and the articles feature illustrative real-world coding. Our readers are Basis, ABAP, Workflow, Web Dynpro, HANA, Fiori and Mobility consultants. We publish SAP/ERP technical articles in a variety of lengths and sizes. And we include general tips and feature-length articles as well. We will be showcasing a number of published book chapters in upcoming editions, along with including white papers about useful tools and products.
ERP Magazine April 2018 - The magazine for SAP ABAP ProfessionalsRehan Zaidi
ERP Magazine is a monthly publication focusing on ERP/SAP software technical insights and innovations, for both new and advanced learners. In every issue, leading authors and consultants from a diverse set of companies present their ideas and/or achievements in a clear fashion. Each article is carefully reviewed both by technical and English-language experts. The graphics are rich in content and visual style, and the articles feature illustrative real-world coding. Our readers are Basis, ABAP, Workflow, Web Dynpro, HANA, Fiori and Mobility consultants. We publish SAP/ERP technical articles in a variety of lengths and sizes. And we include general tips and feature-length articles as well. We will be showcasing a number of published book chapters in upcoming editions, along with including white papers about useful tools and products. Available on Amazon Worldwide in Kindle format.
1. The document discusses different types of functions in C programming including library functions, user-defined functions, and the main function. It also covers the differences between function prototypes and function definitions.
2. Function prototypes declare a function's name, return type, and parameters while function definitions implement the body of the function. Prototypes are required if a function is defined after it is called.
3. The document also covers function parameters, scope, and passing methods including call by value and call by reference. Call by value passes a copy of the arguments while call by reference passes the memory address allowing the function to modify the original values.
The document outlines an interactive retail installation project including interactive catalogue, rotating product, and touch ordering stations along with a motion graphic promotion video. The stations allow customers to view products from all angles, order outfits, and learn about products. The motion graphic promotes the brand. The installation uses various hardware, software, assets and coding to create an engaging experience for customers.
Micky Mouse and a computer will play a game of rock, paper, scissors against each other. They will randomly select between rock, paper, or scissors without seeing each other's choice. If they choose the same gesture, it is a tie. If they choose different gestures, the one that beats the other according to the rules of rock, paper, scissors will win. The game will continue until one player has won more rounds than the other according to the predetermined winning criteria.
The document discusses the benefits of exercise for mental health. Regular physical activity can help reduce anxiety and depression and improve mood and cognitive function. Exercise causes chemical changes in the brain that may help protect against developing mental illness and improve symptoms for those who already suffer from conditions like anxiety and depression.
The document discusses the benefits of exercise for mental health. Regular physical activity can help reduce anxiety and depression and improve mood and cognitive function. Exercise causes chemical changes in the brain that may help protect against mental illness and improve symptoms.
This 3-sentence summary provides the high-level and essential information from the document:
This document outlines a course on scripting for design at Durham College, including prerequisites, course description, learning outcomes, evaluation methods, and policies. Students will learn JavaScript programming and how to use it to enhance web page design and interactivity. Evaluation will include in-class coding reviews, assignments, tests, and individual coding projects assessed based on function, documentation, and style. Course policies address attendance, communication, and academic honesty.
This document provides an overview of a course on JavaScript programming. It outlines the 7 modules that make up the course, with topics like variables, functions, loops, and objects to be covered. It also describes the learning objectives and activities for Module 2 on getting started with JavaScript, which includes adding JavaScript to web pages, writing basic code, and using developer tools. Debugging techniques like using console.log and browser developer tools are discussed. The document also covers JavaScript concepts like its standardization, where code can be inserted in HTML, and basic syntax rules.
The movie "Indian Horse" tells the story of Saul, a Native Canadian boy who is sent to a residential school where the children faced abuse and were forbidden from speaking their native language or practicing their culture. Saul discovers a talent for hockey and is able to play professionally, but still faces racism. He struggles with alcoholism before eventually finding healing. The film highlights the mistreatment and cultural suppression endured by Indigenous people in the Canadian residential school system.
This 3-sentence summary provides the high-level and essential information from the document:
This document outlines a course on scripting for design at Durham College, including prerequisites, course description, learning outcomes, evaluation methods, and policies. Students will learn JavaScript programming and how to use it to enhance web page design and interactivity. Evaluation will include in-class coding reviews, assignments, tests, and individual coding projects assessed based on function, documentation, and style. Course policies address attendance, communication, and academic honesty.
This document provides a cheat sheet of common commands for the vi text editor, including commands for file management, window navigation, cursor movement, entering and exiting command mode, text insertion, deletion, copying, pasting, searching, replacing, and setting parameters. It also includes examples of using regular expressions for search strings and search/replace commands.
Hue refers to the identity of a color such as red, orange, or blue. A color's saturation describes its intensity or vibrancy, with saturated colors being vibrant and desaturated colors being dull. A color's value refers to its darkness or lightness relative to other colors, with yellow appearing light and violet appearing dark. Temperature is a subjective quality where warm colors like red or orange remind us of heat and cool colors like blue or green remind us of cold.
Complementary colors are directly across from each other on the color wheel and create a vibrant contrast when used at full saturation, but must be carefully balanced to avoid being jarring. Analogous colors are next to each other on the wheel and create harmonious and natural designs, with one color dominating and the others in support. Triadic colors are evenly spaced around the wheel and can be vibrant even in pale hues, working best when one color dominates and two others are used for accent.
The document discusses four common layout patterns used to guide a reader's eye through a design: the Gutenberg diagram, F-pattern layout, Z-pattern layout, and Zig Zag-pattern layout. The Gutenberg diagram describes how a reader's eyes typically sweep across a page in horizontal axes from the primary to terminal areas. The F-pattern layout places important information at the top and less important information on the left side in bullet points. The Z-pattern layout follows the shape of the letter Z, placing key information along that path. The Zig Zag-pattern extends the Z-pattern by seeing it as a series of Z movements rather than one to mimic how readers naturally scan long blocks of text.
Rhythm, framing, transparency and time & motionKopi Maheswaran
Rhythm in design refers to repetition, which allows for internal consistency and helps users understand designs more easily. Nearly any element of a web design can be repeated to create rhythm, such as headlines, images, or styles across pages. Framing involves presenting visual elements in a way that directs attention, such as keeping the focus on important information. Time and motion are also important design principles, as anything that moves has both spatial and temporal dimensions. Motion can be implied through techniques like diagonal lines or cropping, in addition to literal movement. Adding depth to designs can be achieved through layering objects and using different levels of transparency.
This document provides a summary of common sentence errors and grammar concepts covered in Communication Essentials Week 5. It begins with a reminder of the Reading & Writing Lab #3 assignment due at the end of the week. It then covers topics such as complete sentences, sentence fragments, run-on sentences, dependent and independent clauses, verb tenses and forms, and passive and active voice. Examples are provided to illustrate each concept. The document concludes with homework assignments to review the material covered and study for an upcoming test.
This document provides guidelines for using the FAIRPort Hope brand logo properly. It specifies that the logo can be used without a background color and only the logo image should be used without accompanying text. The logo must be placed in the left corner of websites. It also provides specifics on logo sizing, backgrounds, colors and fonts to ensure accurate representation of the brand. Color codes in RGB, CMYK, HEX and PMS formats are given for the logo colors.
This document provides instruction on punctuation rules, including apostrophes, commas, semicolons, and colons. It discusses when to use apostrophes for contractions and possession, lists five rules for using commas, explains how to use semicolons between two independent clauses and before transitional words, and reviews proper use of colons before lists or explanations. The document includes examples and practice activities to reinforce the punctuation concepts.
This document discusses common web technology protocols. It explains that protocols are sets of rules that govern data exchange between devices and are usually assigned to specific ports. It then describes some key protocols including IP, TCP, UDP, HTTP, HTTPS, FTP, SSH, and others. It lists the standard ports used by these various protocols and provides a brief overview of their functions and whether they transmit encrypted or unencrypted data.
This document discusses various technologies used for the web, categorizing them into markup languages, scripting languages, programming languages, databases, libraries, and frameworks. It provides examples of technologies for each category, such as HTML, CSS, and XML for markup languages; JavaScript and PHP for scripting languages; C and Java for programming languages; MySQL, PostgreSQL, and MongoDB for databases; jQuery and MooTools for libraries; and Angular, React, and Vue for frameworks.
Gender and Mental Health - Counselling and Family Therapy Applications and In...PsychoTech Services
A proprietary approach developed by bringing together the best of learning theories from Psychology, design principles from the world of visualization, and pedagogical methods from over a decade of training experience, that enables you to: Learn better, faster!
Temple of Asclepius in Thrace. Excavation resultsKrassimira Luka
The temple and the sanctuary around were dedicated to Asklepios Zmidrenus. This name has been known since 1875 when an inscription dedicated to him was discovered in Rome. The inscription is dated in 227 AD and was left by soldiers originating from the city of Philippopolis (modern Plovdiv).
A Visual Guide to 1 Samuel | A Tale of Two HeartsSteve Thomason
These slides walk through the story of 1 Samuel. Samuel is the last judge of Israel. The people reject God and want a king. Saul is anointed as the first king, but he is not a good king. David, the shepherd boy is anointed and Saul is envious of him. David shows honor while Saul continues to self destruct.
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumMJDuyan
(𝐓𝐋𝐄 𝟏𝟎𝟎) (𝐋𝐞𝐬𝐬𝐨𝐧 𝟏)-𝐏𝐫𝐞𝐥𝐢𝐦𝐬
𝐃𝐢𝐬𝐜𝐮𝐬𝐬 𝐭𝐡𝐞 𝐄𝐏𝐏 𝐂𝐮𝐫𝐫𝐢𝐜𝐮𝐥𝐮𝐦 𝐢𝐧 𝐭𝐡𝐞 𝐏𝐡𝐢𝐥𝐢𝐩𝐩𝐢𝐧𝐞𝐬:
- Understand the goals and objectives of the Edukasyong Pantahanan at Pangkabuhayan (EPP) curriculum, recognizing its importance in fostering practical life skills and values among students. Students will also be able to identify the key components and subjects covered, such as agriculture, home economics, industrial arts, and information and communication technology.
𝐄𝐱𝐩𝐥𝐚𝐢𝐧 𝐭𝐡𝐞 𝐍𝐚𝐭𝐮𝐫𝐞 𝐚𝐧𝐝 𝐒𝐜𝐨𝐩𝐞 𝐨𝐟 𝐚𝐧 𝐄𝐧𝐭𝐫𝐞𝐩𝐫𝐞𝐧𝐞𝐮𝐫:
-Define entrepreneurship, distinguishing it from general business activities by emphasizing its focus on innovation, risk-taking, and value creation. Students will describe the characteristics and traits of successful entrepreneurs, including their roles and responsibilities, and discuss the broader economic and social impacts of entrepreneurial activities on both local and global scales.
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPRAHUL
This Dissertation explores the particular circumstances of Mirzapur, a region located in the
core of India. Mirzapur, with its varied terrains and abundant biodiversity, offers an optimal
environment for investigating the changes in vegetation cover dynamics. Our study utilizes
advanced technologies such as GIS (Geographic Information Systems) and Remote sensing to
analyze the transformations that have taken place over the course of a decade.
The complex relationship between human activities and the environment has been the focus
of extensive research and worry. As the global community grapples with swift urbanization,
population expansion, and economic progress, the effects on natural ecosystems are becoming
more evident. A crucial element of this impact is the alteration of vegetation cover, which plays a
significant role in maintaining the ecological equilibrium of our planet.Land serves as the foundation for all human activities and provides the necessary materials for
these activities. As the most crucial natural resource, its utilization by humans results in different
'Land uses,' which are determined by both human activities and the physical characteristics of the
land.
The utilization of land is impacted by human needs and environmental factors. In countries
like India, rapid population growth and the emphasis on extensive resource exploitation can lead
to significant land degradation, adversely affecting the region's land cover.
Therefore, human intervention has significantly influenced land use patterns over many
centuries, evolving its structure over time and space. In the present era, these changes have
accelerated due to factors such as agriculture and urbanization. Information regarding land use and
cover is essential for various planning and management tasks related to the Earth's surface,
providing crucial environmental data for scientific, resource management, policy purposes, and
diverse human activities.
Accurate understanding of land use and cover is imperative for the development planning
of any area. Consequently, a wide range of professionals, including earth system scientists, land
and water managers, and urban planners, are interested in obtaining data on land use and cover
changes, conversion trends, and other related patterns. The spatial dimensions of land use and
cover support policymakers and scientists in making well-informed decisions, as alterations in
these patterns indicate shifts in economic and social conditions. Monitoring such changes with the
help of Advanced technologies like Remote Sensing and Geographic Information Systems is
crucial for coordinated efforts across different administrative levels. Advanced technologies like
Remote Sensing and Geographic Information Systems
9
Changes in vegetation cover refer to variations in the distribution, composition, and overall
structure of plant communities across different temporal and spatial scales. These changes can
occur natural.
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.pptHenry Hollis
The History of NZ 1870-1900.
Making of a Nation.
From the NZ Wars to Liberals,
Richard Seddon, George Grey,
Social Laboratory, New Zealand,
Confiscations, Kotahitanga, Kingitanga, Parliament, Suffrage, Repudiation, Economic Change, Agriculture, Gold Mining, Timber, Flax, Sheep, Dairying,
How to Make a Field Mandatory in Odoo 17Celine George
In Odoo, making a field required can be done through both Python code and XML views. When you set the required attribute to True in Python code, it makes the field required across all views where it's used. Conversely, when you set the required attribute in XML views, it makes the field required only in the context of that particular view.
1. M4 - Functions
School of Media, Art, & Design
CWMD2601 –
Scripting for Design
4/3/2020 M4 - Functions 1
2. 4/3/2020
13
3
5
1
15
4
0
2
4
6
8
10
12
14
16
N/A E Fail D 50-70% C 70-80% B 80-90% A 90-110%
In-Class Coding #1: Grade Distributions
Thursday (41 students)
4
1 1 0
5
30
0
5
10
15
20
25
30
35
N/A E Fail D 50-70% C 70-80% B 80-90% A 90-110%
In-Class Coding #1: Grade Distributions
Friday (41 students)
In Class Coding #1 – Grade Distributions
3. 4/3/2020 3
functionsreuse
decisionscondition
loops
repeat
arrays and
objects
variables
values
expressions
key elements
Programming
process
M3 – week 3
M4 – week 4 and 5
M5 – week 6, 8 and 9
(week 7 –mid term)
M6 – week 10 and 11
M7 – week 12 and 13
(week 14 – final)
Course Learning Path – 7 Modules course outlines
enhance
JavaScript
programming
M1 – week 1
M2 – week 2
M4 - Functions
• Algorithms
• Pseudo code
• Flow charts
• Essential statements
• Adding JS to Web pages
• Writing basic code
• Events and DOM
• Using Developer tools
• Declaring variables
• Data types
• Arithmetic operators
• precedence
• Definition
• Parameters
• Return values
• Application
• Scope
• Declaring
• Index
• Reading & writing values
• Dimension
• application
• Conditions
• Boolean values & operators
• Precedence
• If statements
• application
• For statement
• While statement
• Nested loops
4. 4/3/2020 4
Refresh -M1, M2 and M3 Takeaways
M2 – Getting Started
with JavaScript
M1 -The
Programming
Process
IPO
1. INPUT
2. OUTPUT
3. DECLARATION
4. EXPRESSION
5. DECISION
6. LOOP
variables values expressions
Algorithms
PC, FC
Statements
IPO
I&D Web
Page
PROGRAMMING
RUN
M3 – Variables,
Values,
Expressions
M4 - Functions
input output
process
How Data are stored ?
lobal vs local variables
declaration using “let”
What are the Data types ?
number
string
Boolean
null
undefined
object/function/arrays
How Data are computed?
assignment
arithmetic, string operators
comparison operator
mixed operator
IPO – Data Processing
M4 – Functions
START
input
Task(s)
STOP
Decision
output
Task(s)Task(s)
output
properties methods events
Object
DOM
HTML
(structure, ”look”)
CSS
(presentation,
“feel”)
JS
(behavior, “act”)
IO statements
comments
debug
good practices
5. 4/3/2020 M4 - Functions 5
Refresh -M1, M2 and M3 Takeaways
Download the “M1-3 Summary” spreadsheet, and provide an
example for each; from M2 and M3 in-class coding exercises
6. 4/3/2020 6
M4 Functions – Objectives
Make Use of JavaScript Built-in and
Custom-Built Functions
Definition
Parameters
Return Values
Application
Scope
M4 - Functions
7. 4/3/2020 7
M4 Functions – Activities (WK4 and 5)
Understand parameters, arguments, and return values
Explore some common errors when coding functions
Revisit scope rules for variables declared with let
Demonstrate the ES6 arrow function syntax
M4 - Functions
Explain the function concept and its benefits
Differentiate between built in and user defined
functions
Distinguish function declarations and function
expressions
Create user defined functions
8. 4/3/2020 M4 - Functions 8
Concepts: Notation and Benefits
Built-in Functions: Core, Browser (BOM) and
Document (DOM)
Custom-Built Functions: User defined, Named vs
Anonymous
Invoking Functions: Parameters and Return
(Input/Output)
Variable Scopes: Global vs Local
M4 Functions – Topics
9. What is a flowchart?
A. A text-based way of designing an
algorithm
B. A set of diagrams that represents a
set of instructions
4/3/2020 M1 – The Process of Programming 9
START
input
Task(s)
STOP
Decision
output
Task(s)Task(s)
10. Which flowchart symbol represents input?
A. Rectangle
B. Circle
C. Parallelogram
D. Terminal (ovals or rectangles
with rounded corners)
4/3/2020 M1 – The Process of Programming 10
START
input
Task(s)
STOP
Decision
output
Task(s)Task(s)
11. Which flowchart symbol represents process
statements?
A. Rectangle
B. Circle
C. Parallelogram
D. Diamond
4/3/2020 M1 – The Process of Programming 11
START
input
Task(s)
STOP
Decision
output
Task(s)Task(s)
12. 4/3/2020 M4 - Functions 12
M4 Functions – Concepts
Re-use: Applications often need to run
the same block or section of code at
several points or places
Modularity: Modern systems tend to be
complex and difficult to understand,
test, and debug, e.g. this course has 7
modules
Function: A block of code performing a
specific task that can be ran as a single
unit, with/without a name, and be used
many times, in the same or different
programs, e.g. M3 (Mortgage calculations)
START
input
Task(s)
STOP
Decision
output
Task(s)Task(s)
output
functions
ProcessInput Output
13. 4/3/2020 M4 - Functions 13
M4 Functions – Concepts
Like Math
Behaves like a smaller program within
a larger main program
Usually written to perform a single
task, a task we often expect to
perform many times
Just like in every day life or math y=f(x), a function
may need some inputs in order to provide an output
Function WILL NOT be executed until ‘others’
invoke it. In Console, try this!
ProcessInput Output
x f(x) y
Variable “a” stores the output value
(result from an expression)
Variable “b” stores the codes
(function statement, not value)
14. 4/3/2020 M4 - Functions 14
M4 Functions – Concepts
Key to Programming Process
Algorithms
Statements
Web Page
PROGRAMMING
RUN
f(..){..}
. . .
First Call
Return first result
Second Call
Return second result
Invoke: Any and multiple time, unary expression. e.g. b(3); or
binary expression, e.g. let y=b(3)
Flow Chart JS Statement
15. 4/3/2020 M4 - Functions 15
M4 Functions – Concepts
Common use cases in JS programming
In programming, a function usually performs
one well defined "high level" task that we
expect to carry out many times, such as:
changing web page styles or content
displaying web page hit count
validating web form input
performing calculations like scale
conversions
In older languages functions are often called procedures or
subroutines , but are referred to as methods in DOM.
16. 4/3/2020 M4 - Functions 16
M4 Functions – Concepts
Key Benefits: Modularity and Re-Use
Divide & Conquer - Functions in JS
programming
Divide: Break up a large/complex
JS program into modules/blocks,
e.g. Code Block ({…})
Conquer: Solve individual
problem, easier to code/maintain
Types: Built-In and User-Defined
Objects: In OOP, Function is referred to as Methods, e.g.
alert() and console.log, built-in JavaScript browser methods
17. A(n) ___ allows you to execute a related
group of statements as a single unit.
A. variable
B. statement
C. event
D. code block
4/3/2020 M4 - Functions 17
18. A code block simply consists of grouped
statements with curly braces ({..}), e.g.
A. True
B. False
4/3/2020 M4 - Functions 18
19. From the following(s), select all the JavaScript’s
built-in function types.
A. core
B. browser
C. document
D. User-Defined
4/3/2020 M4 - Functions 19
20. For any fields that require numeric values, you can
use JavaScript’s built-in ________ core function to
determine whether the user actually entered a
number.
A. value()
B. integer()
C. isNumber()
D. isNaN()
4/3/2020 M4 - Functions 20
21. In JavaScript, window.prompt() method, a browser
built-in function (BOM), return true or false value ?
A. True
B. False
4/3/2020 M4 - Functions 21
22. What is the correct JS syntax (a DOM built-in
function, aka method) to change the content of
the HTML element below?
A. document.getElementByName("p").in
nerHTML = "Hellow World!";
B. document.getElementById("p").inner
HTML = "Hellow World!";
C. document.getElement("p").innerHTM
L = "Hellow World!";
D. #demo.innerHTML = "Hello World!";
4/3/2020 M4 - Functions 22
23. Which event (BOM built-in function) is used to
run something after the page has finished
loading?
A. onfinished
B. oncomplete
C. onload
4/3/2020 M4 - Functions 23
24. You use the Math.pow() method (core built-in
function) to:
A. Return any number
B. Return a number raised to the
power of a second number
C. Return a random value
between 0 and 1
D. Return a variable value
4/3/2020 M4 - Functions 24
25. let a = ‘011’; parseInt(a); will return:
A. 11
B. 0
C. 9
D. error
4/3/2020 M4 - Functions 25
26. The following programs produce the same
output?
A. True
B. False
4/3/2020 M4 - Functions 26
27. 4/3/2020 M4 - Functions 27
M4 Functions – Built-In Functions in-class Exercises
See “M4 In Class Coding” in DC Connect
Must be submitted by end of today
28. 4/3/2020 28
Refresh -M1, M2, M3 and M4 Takeaways
M2 – Getting Started
with JavaScript
M1 -The
Programming
Process
IPO
1. INPUT
2. OUTPUT
3. DECLARATION
4. EXPRESSION
5. DECISION
6. LOOP
variables values expressions
Algorithms
PC, FC
Statements
IPO
I&D Web
Page
PROGRAMMING
RUN
M3 – Variables,
Values,
Expressions
M4 - Functions
input output
process
How Data are stored ?
lobal vs local variables
declaration using “let”
What are the Data types ?
number
string
Boolean
null
undefined
object/function/arrays
How Data are computed?
assignment
arithmetic, string operators
comparison operator
mixed operator
IPO – Data Processing
M4 – Functions
START
input
Task(s)
STOP
Decision
output
Task(s)Task(s)
output
properties methods events
Object
DOM
HTML
(structure, ”look”)
CSS
(presentation,
“feel”)
JS
(behavior, “act”)
IO statements
comments
debug
good practices
f(..){..}
29. 4/3/2020
In Class Coding #2 – Grade Distributions
31
4
2 1 1
3
0
5
10
15
20
25
30
35
A 90-110 B 80-90 C 70-80 D 50-70 E Fail N/A
In-Class Coding #2: Grade Distributions
Thursday
20
2
3
5
4
7
0
5
10
15
20
25
A 90-110 B 80-90 C 70-80 D 50-70 E Fail N/A
In-Class Coding #2: Grade Distributions
Friday
13
3
5
1
15
4
0
2
4
6
8
10
12
14
16
N/A E Fail D 50-70% C 70-80% B 80-90% A 90-110%
In-Class Coding #1: Grade Distributions
Thursday (41 students)
4
1 1 0
5
30
0
5
10
15
20
25
30
35
N/A E Fail D 50-70% C 70-80% B 80-90% A 90-110%
In-Class Coding #1: Grade Distributions
Friday (41 students)
30. 4/3/2020 M4 - Functions 30
M4 Functions – continue (week 5)
Concepts and Built-in Functions
User Defined Functions: Named vs Anonymous
Invoking Functions: Parameters and Return (Input/Output)
Scopes: Global vs Local Variables
TYPE e.g. FUNCTIONs TASK PERFORMED
Core and
Browser
Math.pow calculates powers or exponents
parseInt convert string to integer
parseFloat convert string to decimals
alert displays pop up window with message
prompt displays pop up requesting input
DOM
getElementById access specific page element
addEventListener attach code to respond to event
continue
31. 4/3/2020 M4 - Functions 31
Testing: HTML program vs console
32. 4/3/2020 M4 - Functions 32
M4 Functions –User Defined Functions
What to consider? :
1. what needs to be done ?
2. What/if it will be named ?
3. how it will accomplish its task ?
4. what inputs it requires (if any) ?
5. what output it produces (if any) ?
START
input
Task(s)
STOP
Decision
output
Task(s)Task(s)
output
functions
What technique to use to define the
function?
f(..){..}
33. 4/3/2020 M4 - Functions 33
Refresh: M2 Variable, Declaration and Expression
Declaration – assign name, value and data type
var, const, let – keywords to declare a variable for
their data type: number, string and Boolean
(primitive)
function – keyword to declare function variable
Expression – perform tasks and return
a value variable value ;
expression
34. 4/3/2020 M4 - Functions 34
M4 Functions – Definition Techniques
Named/Anonymous, with/without return value
Using function keyword
Declaration (named)
Expression (anonymous)
Using function constructor
Object Construction
(won’t be covered in this course)
perform
actions only
(define it before invoking it)
35. Which function declaration technique was
used in the following example?
A. Named: with function keyword in a
declaration statement
B. Anonymous: performing actions, no
return value
4/3/2020 M4 - Functions 35
36. Which function declaration technique was
used in the following example?
A. Named: in a declaration statement,
with a return value
B. Anonymous: with function keyword in
an expression
4/3/2020 M4 - Functions 36
37. 4/3/2020 M4 - Functions 37
M4 Functions –User Defined
Named Function: Declaration statement
5 Considerations
indent
indent
Part 1 Header:
keyword, name, parameters
Part 2:
Body
1.what needs to be done ?
2.what/if it will be named ?
3.how it will accomplish its task ?
4.what inputs it requires (if any) ?
5.what output it produces (if any) ?
example
f(..) {..}
header body
38. 4/3/2020 M4 - Functions 38
M4 Functions –User Defined
Named Function: Example
#2 the NAME
#3 the TASKs
#1 the NEEDs
#4 the INPUT
#5 the OUTPUT
1.what needs to be done ?
2.what it will be named ?
3.how it will accomplish its task ?
4.what inputs it requires (if any) ?
5.what output it produces (if any) ?
39. 4/3/2020 M4 - Functions 39
M4 Functions – Invoking Functions
Similar to how built-in functions are called
System invoked – by event handlers,
for Anonymous function
Statements inside the function are executed only
when “something” invokes it; code or system
Code invoked: by “you”, for Named
function; with or without parameters
(expression or assignment statement)
40. 4/3/2020 M4 - Functions 40
<!DOCTYPE html>
<html lang = "en">
<head>
<title>CWMD2601 – Scripting</title>
<meta charset = "utf-8" />
<!—enter your title info-->
</head>
<link rel="stylesheet" href="M2 Exercise.css" />
<h1>Module 2 Assignment0 -Extended Greeting</h1>
<body>
<label for = "name">NAME:</label>
<input type="text" id="name" size="15">
<label for = "program">PROGRAM:</label>
<input type="text" id="program" size="30" >
<p id = "greeting">Your personal greeting will display here</p>
<button id = "greet">
Display Greeting
</button>
<script src=“script.js"></script>
</body>
</html>
// creates a personalized greeting
document.getElementById('greet').onclick = function () {
// get user's name from the text field
let userName = document.getElementById('name').value;
// get user's name from the text field
let programName = document.getElementById('program').value;
// greet user by name in the document
document.getElementById('greeting').textContent
= 'Hello ' + userName + '. Hope you are enjoying the ' +
programName + ' program!';
document.getElementById('greeting').style.color = 'red';
document.getElementById('greeting').style.backgroundColor =
'yellow';
}
index.html
script.js
M2 Greeting Exercise –Anonymous Function
41. 4/3/2020 M4 - Functions 41
M4 Functions –User Defined Functions
Named Function: Exercise
Modify Your M2 Program with Named Function
anonymous and system invoked
named and system invoked
42. 4/3/2020 M4 - Functions 42
M4 Functions – Invoking Functions (Named)
Parameters (Input)
Arguments – values passed to the parameters; literals,
variables, or expressions
Expressions - first evaluated, then the values are passed to
the function
Variables – only it’s values are passed, original variables will
not change, try the following:
1.what needs to be done ?
2.what it will be named ?
3.how it will accomplish its task ?
4.what inputs it requires (if any) ?
5.what output it produces (if any) ?
f(..) {..}
header body
43. 4/3/2020 M4 - Functions 43
M4 Functions –User Defined Functions
Anonymous
// creates a personalized greeting
document.getElementById("greet").onclick = function () {
// get user's name from the text field
var userName = document.getElementById('name').value;
// greet user by name in the document
document.getElementById('greeting').textContent
= 'Welcome ' + userName + '!';
};
Recall that we used a custom function when we coded the
greeting script:
The function had no name, as an expression:
syntax: function (parm1, parm2) {..statements..}
It was invoked by event handlers for onclick button
f(..) {..}
header body
44. 4/3/2020 M4 - Functions 44
M4 Functions – Invoking Functions (Named)
Return (Output)
Must exit with a return statement
if an output value is expected
return expression;
1.what needs to be done ?
2.what it will be named ?
3.how it will accomplish its task ?
4.what inputs it requires (if any) ?
5.what output it produces (if any) ?
literal value, variable or
calculation
back to the calling
statement, and continue
Use Console to test the following with parameters: -1, 0,
1, Infinity, –Infinity
f(..) {..}
header body
45. 4/3/2020 M4 - Functions 45
M4 Functions – Invoking Functions (Named)
Exercise –user invoked, with parameters
Use a Console to test the convertToCentigrade function. Note that
the return value from a function can be assigned to a variable or
consumed directly as in the alert.
46. 4/3/2020 M4 - Functions 46
M4 Functions – Variable Scopes
Scope - a variable property, describes which part
of the program can see/use it
global – declared outside of any function (or
code block)
local – aka function scope, declared inside
and only be used within the function
let – instead of var, cleared some of the confusions
Try the followings in Console
f(..) {..}
header body
47. 4/3/2020 M4 - Functions 47
M4 Functions – User Defined Functions
Summary
Named functions – declaration, for re-use & modularity
Names must match in the declare and call statements
Anonymous functions – expression (no name), for modularity
only, e.g. element.addEvent.Listener(“event” , function(){…..})
Return -can perform just actions or return values, or both
Parameters are optional, but must match the calling
statement; the right order and type
let instead of var
The “five things” to consider
1.what needs to be done ?
2.what it will be named ?
3.how it will accomplish its task ?
4.what inputs it requires (if any) ?
5.what output it produces (if any) ?
f(..) {..}
header body
48. Which of the following declaration statement
is to define a named function?
A. function=myFunction(){..}
B. function myFunction(){..}
C. function:myFunction(){..}
D. let function=myFunction(){..}
4/3/2020 M4 - Functions 48
f(..) {..}
header body
myFunction
49. With JavaScript how do you call a function
named "myFunction"?
A. call function myFunction()
B. call myFunction()
C. myFunction()
D. x = myFunction()
4/3/2020 M4 - Functions 49
f(..) {..}
header body
myFunction,
invoked by
• System or
• User
50. Inside the process symbol of the flow chart, can
there be another flowchart ? for modulization.
A. True
B. False
4/3/2020 M1 – The Process of Programming 50
START
input
Task(s)
STOP
Decision
output
Task(s)Task(s)
START
input
Task(s)
STOP
Decision
output
Task(s)Task(s)
51. Is it possible to nest functions in JavaScript?
A. True
B. False
4/3/2020 M4 - Functions 51
f(..) {..}
header body
52. A. True
B. False
4/3/2020 M4 - Functions 52
plus() is a nested function
f(..) {..}
header body
Same as counter = counter + 1;
53. Which technique is used to define function add()?
A. Anonymous
B. Named
C. Constructor
4/3/2020 M4 - Functions 53
54. What is the value of total?
A. 0
B. 1
C. 2
D. None of the above
4/3/2020 M4 - Functions 54
55. Which of the following is a valid function
definition?
A. function myFunc(arg1,arg2) { }
B. func myFunc = (arg1 as string,
arg2 as int) { }
C. function myFunc(arg1, arg2):
4/3/2020 M4 - Functions 55
f(..) {..}
header body
56. Can you assign a anonymous function to a
variable?
A. True
B. False
4/3/2020 M4 - Functions 56
variable value ;
expression
Operators
arithmetic
string
comparison
logical
number
string
Boolean
null
undefined
object/??/array
HINT: Assignment Statement
57. How do you assign an anonymous function to
a variable?
A. let myFunction = function() { };
B. let myFunction = func() { };
C. let myFunction = func({});
4/3/2020 M4 - Functions 57
variable value ;
expression
operators
arithmetic
string
comparison
logical
number
string
Boolean
null
undefined
object/function/array
58. Sending values to the parameters (aka input to
the function) of a called function is called passing
arguments_.
A. True
B. False
4/3/2020 M4 - Functions 58
START
input
Task(s)
STOP
Decision
output
Task(s)Task(s)
output
functions
f(..) {..}
header body
59. What statement is to return a value to the
place that called the function?
A. déclaration (let, var, function)
B. assignment statement
C. return
4/3/2020 M4 - Functions 59
f(..) {..}
header body
60. Parameters in a function definition are placed
within __________ .
A. braces
B. parentheses
C. double quotes
D. single quotes
4/3/2020 M4 - Functions 60
Hint:
61. Given the following code, what does myFunc()
return?
A. foobar
B. NaN
C. undefinedundefined
D. An error is thrown because of illegal
out of scope access
E. foo + bar
4/3/2020 M4 - Functions 61
62. Given the followings code, what does myFunc()
return?
A. 0
B. 5
C. 10
D. Undefined
E. NaN
4/3/2020 M4 - Functions 62
63. Given the followings code, what is the value of x
after myFunc is called?
A. 0
B. 5
C. 10
D. Undefined
E. NaN
4/3/2020 M4 - Functions 63
HINT: When invoking a function with parameters,
only their values are passed as arguments
64. If a function doesn’t explicitly use the “return”
operator, what will the return value be when the
function is invoked?
A. null
B. undefined
C. false
D. NaN
4/3/2020 M4 - Functions 64
f(..) {..}
header body
65. What will be returned after invoking `foo` ?
A. 7
B. 10
C. undefined
D. null
E. foo
4/3/2020 M4 - Functions 65
f(..) {..}
header body
66. What is alerted after function b is invoked?
A. 2
B. 1
C. 10
D. 3
4/3/2020 M4 - Functions 66
f(..) {..}
header body
HINT: arguments is an array storing the input values.
Not yet covered, try it !
67. What value is passed to function myFunction as
the argument?
myFunction( ‘5’);
A. ‘5’ (string)
B. 5 (number)
C. NaN
4/3/2020 M4 - Functions 67
f(..) {..}
header body
68. How can you get the value type of arguments
passed to a function?
A. using typeof() operator
B. using getType() function
C. Both of the above.
D. None of the above.
4/3/2020 M4 - Functions 68
f(..) {..}
header body
69. With the following statements, what is in the
console?
A. Number
B. String
C. Boolean
D. None of the above
4/3/2020 M4 - Functions 69
f(..) {..}
header body
70. What is alerted after function b is invoked?
A. Number
B. String
C. Boolean
D. None of the above
4/3/2020 M4 - Functions 70
f(..) {..}
header body
71. Guess what is alerted after function b is invoked?
A. 1
B. 2
C. 3
D. 5
4/3/2020 M4 - Functions 71
f(..) {..}
header body
72. Which of the following type of variable is visible
and accessible everywhere in your JavaScript
code?
A. global variable
B. local variable
C. Both of the above.
D. None of the above.
4/3/2020 M4 - Functions 72
f(..) {..}
header body
73. List all the global variables in the following program?
A. total and counter
B. total only
C. counter only
D. none
4/3/2020 M4 - Functions 73
f(..) {..}
header body
74. List all the local variables in the following program ?
A. total and counter
B. total only
C. counter only
D. none
4/3/2020 M4 - Functions 74
f(..) {..}
header body
75. What is alerted?
A. Undefined
B. 3
C. Invalid JavaScript
4/3/2020 M4 - Functions 75
76. What is alerted?
A. Undefined
B. 3
C. Invalid JavaScript
4/3/2020 M4 - Functions 76
77. What is alerted ?
A. ‘hello’
B. nothing
C. ‘Invalid JavaScript’ error message
4/3/2020 M4 - Functions 77
78. What is alerted?
A. ‘hello’
B. nothing
C. ‘Invalid JavaScript’ error message
4/3/2020 M4 - Functions 78
f(..) {..}
header body
79. The followings have the same result?
A. True
B. False
4/3/2020 M4 - Functions 79
82. What is alerted?
A. both are number
B. both are string
C. both are Boolean
D. both are function
4/3/2020 M4 - Functions 82
83. The following codes produce the same result.
A. True
B. False
4/3/2020 M4 - Functions 83
84. 4/3/2020 M4 - Functions 84
M4 Functions –User Defined Functions
Best Practices
Placement all function definitions in .js
file and insert “..src=“ statement right
above </body> tag
Declare all global variables first, (using
let) then function definitions, then the
invoking statements
Name rules for function and parameter are same as variable,
e.g. cannot use JS reserved words, space are not allowed, …etc.
Use lower case verb for functions that perform actions, e.g.
calcTax, displayDate
85. let convertToCentigrade =
degFahren => 5/9 * (degFahren - 32);
ES6 introduced a shorter, more compact way to create a JavaScript
function. Known as arrow functions because their syntax uses =>
they are becoming increasingly common. The way they are coded
again borrows from how functions in mathematics are written.
Here's the temperature conversion convertToCentigrade recoded as
an arrow function. Note that much of the previous syntax (like
return) is no longer needed. Use the Console to test this out.
T4 – Functions
Because arrow functions behave a little differently than a normal
function declared with function we will NOT use them in this course.
They are presented as an FYI, especially for those in CWD.
M4 Functions –User Defined Functions (FYI)
Arrow Functions in ES6
86. 4/3/2020 M4 - Functions 86
M4 Functions –User Defined Function
Summary
Type
Built-In: Core, BOM & DOM
User- Built: own or others
User Built
Techniques: declaration,
expression & constructor
Named vs Anonymous
Invoke/Exit
System and code invoked
Parameters: literals,
variables and expressions
“return” statement
with/without value(s)
Scopes
Global vs Local
87. 4/3/2020 87
M1, M2, M3 and M4 Takeaways
M1 -The
Programming
Process
IPO
1. INPUT
2. OUTPUT
3. DECLARATION
4. EXPRESSION
5. DECISION
6. LOOP
variables values expressions
Algorithms
PC, FC
Statements
IPO
I&D Web
Page
PROGRAMMING
RUN
M3 – Variables,
Values,
Expressions
input output
process
How Data are stored ?
lobal vs local variables
declaration using “let”
What are the Data types ?
number
string
Boolean
null
undefined
functions/arrays/objects How Data are computed?
assignment
arithmetic, string operators
comparison operator
mixed operator
IPO – Data Processing
M4 – Functions
built-in, user defined
scope, invoke, return
M4 - Functions
START
input
Task(s)
STOP
Decision
output
Task(s)Task(s)
output
M2 – Getting Started
with JavaScript
DOM
HTML
(structure, ”look”)
CSS
(presentation,
“feel”)
JS
(behavior, “act”)
IO statements
comments
debug
good practices
f(..) {..}
header body
arguments
return
properties methods events
Object