The document discusses inheritance in C# through an example program. The Child class inherits from the Parent class and overrides the print() method. When an instance of the Child class is created, it first calls the Parent class constructor through the base keyword, then the Child constructor is called. When print() is called on the Child instance, it first calls the base print() method from the Parent class, then calls the Child's print() method.
C programming is a general-purpose language developed in the 1970s to write operating systems like UNIX. It is one of the most widely used languages, particularly for systems programming. Some key facts: C was created to develop UNIX and is still widely used for operating systems, compilers, databases and other modern programs. It has various data types like integers, floats, characters, arrays and structures. Variables are defined with a data type and can be initialized. C code is written in files with a .c extension and preprocessed before compilation.
This document provides an introduction to the C# programming language. It discusses the objectives and structure of the first lecture, including an overview of the anatomy of a basic C# program that prints text to the console. The lecture then covers key concepts like variables, data types, arithmetic operators, input/output statements, and decision-making statements. Examples are provided to demonstrate how to write, compile, and run a simple C# program.
This document provides an overview of key C# programming concepts such as declaring variables, data types, conditional statements, loops, namespaces, and more. It also discusses topics like initialization and scope of variables, predefined value and reference types, if statements, and using the console for input/output. The goal is to cover basic C# syntax, conventions, and compiler options to get started with programming in C#.
The document discusses the role of CLR (Common Language Runtime) in .NET framework. It explains that CLR converts programs to native code, handles exceptions, provides type safety, memory management, security, improved performance and is language and platform independent. It also discusses garbage collection and language features supported by CLR. The main components of CLR are CTS (Common Type System), JIT (Just-In-Time) compiler and CLS (Common Language Specification). CTS defines value and reference types while JIT compiles CIL to machine code. CLS provides language interoperability.
C# is an object-oriented programming language where programs consist of objects that interact through methods. The document discusses C# program structure, sample code, how code is executed, and data types in C#. It provides details on value types like integers and floats, reference types like strings, and pointer types. Key features of C# include being case sensitive and requiring semicolons. The document also covers operators, variables, and keywords in C#.
The document provides information about C and C Sharp programming languages. It discusses the history, features, data types, loops, conditional statements, functions, arrays, pointers, object-oriented concepts like inheritance, encapsulation, polymorphism in both the languages. It also highlights some advantages of C Sharp over C like automatic memory management, no need of header files etc.
The document outlines topics related to C# programming including fundamentals, data types, expressions, debugging, conditional statements, loops, classes, methods, and other concepts. It provides descriptions and examples for key elements like declaring variables, defining classes and objects, boxing and unboxing value types, namespaces, and more. The document appears to be serving as a course outline or guide for learning C#.
The document provides an introduction to the C programming language, including its history, features, character sets, tokens, data types, operators, and the basic structure of a C program. It discusses key concepts such as variables, constants, comments, functions, input/output, and how to compile and execute a C program.
C programming is a general-purpose language developed in the 1970s to write operating systems like UNIX. It is one of the most widely used languages, particularly for systems programming. Some key facts: C was created to develop UNIX and is still widely used for operating systems, compilers, databases and other modern programs. It has various data types like integers, floats, characters, arrays and structures. Variables are defined with a data type and can be initialized. C code is written in files with a .c extension and preprocessed before compilation.
This document provides an introduction to the C# programming language. It discusses the objectives and structure of the first lecture, including an overview of the anatomy of a basic C# program that prints text to the console. The lecture then covers key concepts like variables, data types, arithmetic operators, input/output statements, and decision-making statements. Examples are provided to demonstrate how to write, compile, and run a simple C# program.
This document provides an overview of key C# programming concepts such as declaring variables, data types, conditional statements, loops, namespaces, and more. It also discusses topics like initialization and scope of variables, predefined value and reference types, if statements, and using the console for input/output. The goal is to cover basic C# syntax, conventions, and compiler options to get started with programming in C#.
The document discusses the role of CLR (Common Language Runtime) in .NET framework. It explains that CLR converts programs to native code, handles exceptions, provides type safety, memory management, security, improved performance and is language and platform independent. It also discusses garbage collection and language features supported by CLR. The main components of CLR are CTS (Common Type System), JIT (Just-In-Time) compiler and CLS (Common Language Specification). CTS defines value and reference types while JIT compiles CIL to machine code. CLS provides language interoperability.
C# is an object-oriented programming language where programs consist of objects that interact through methods. The document discusses C# program structure, sample code, how code is executed, and data types in C#. It provides details on value types like integers and floats, reference types like strings, and pointer types. Key features of C# include being case sensitive and requiring semicolons. The document also covers operators, variables, and keywords in C#.
The document provides information about C and C Sharp programming languages. It discusses the history, features, data types, loops, conditional statements, functions, arrays, pointers, object-oriented concepts like inheritance, encapsulation, polymorphism in both the languages. It also highlights some advantages of C Sharp over C like automatic memory management, no need of header files etc.
The document outlines topics related to C# programming including fundamentals, data types, expressions, debugging, conditional statements, loops, classes, methods, and other concepts. It provides descriptions and examples for key elements like declaring variables, defining classes and objects, boxing and unboxing value types, namespaces, and more. The document appears to be serving as a course outline or guide for learning C#.
The document provides an introduction to the C programming language, including its history, features, character sets, tokens, data types, operators, and the basic structure of a C program. It discusses key concepts such as variables, constants, comments, functions, input/output, and how to compile and execute a C program.
C is a procedural programming language. It was developed in the early 1970s and is still widely used. The document provides an overview of key aspects of C including data types, variables, constants, operators, control statements like if/else, and functions. It also discusses C programming concepts like low-level vs high-level languages, header files, comments, escape sequences, and more. The document serves as a useful introduction and reference for someone learning the basics of the C programming language.
The document discusses keywords, identifiers, literals, punctuators, and data types in the C# programming language. It defines each concept and provides examples. Keywords are reserved words that implement language features. Identifiers name variables and cannot contain two underscores. Literals assign values to variables and include numbers, characters, strings, and escape sequences. Punctuators separate operations involving operands. Data types specify the size and type of values stored in variables, including primitive types like integers and floating-point, as well as reference types.
This document provides an overview of C++ programming concepts including:
1. C++ programs consist of functions, with every program containing a main() function. Functions contain declarations, statements, comments, and can call libraries.
2. Variables must be declared with a type and can be used to store values. C++ supports integer, floating point, character, and other variable types.
3. C++ allows selection and decision making using if/else statements, switch statements, logical operators, and loops like while and for. Operators allow comparisons and boolean evaluations.
The document provides an overview of Microsoft Visual C# and C# basics. It covers topics like getting started with a first C# program, data types, operators, control statements, namespaces, objects and types, methods, classes, structs, inheritance, interfaces, polymorphism, arrays, generics, collections, memory management, attributes, exceptions and more. It also discusses C# compiler options, console I/O formatting, comments, and directives.
This document introduces key concepts in Java programming including data types, identifiers, variable declarations, constants, comments, arithmetic operations, input/output, and the Scanner and JOptionPane classes. It defines identifiers as names for classes, methods, and variables that must start with a letter or underscore. It describes primitive and non-primitive data types. It explains that variables store values in memory locations and are declared with a type and name. Constants are variables that cannot change value once assigned. Comments are used to explain code. The Scanner class reads input and JOptionPane displays dialog boxes.
The document provides an overview of key concepts in C++, including:
1) C++ adds object-oriented programming capabilities to C while maintaining C's power and flexibility. It was created in 1979 to provide object-oriented programming features to C.
2) Object-oriented programming encourages breaking problems into constituent parts called objects that contain related instructions and data. The three main traits of OOP are encapsulation, polymorphism, and inheritance.
3) C++ supports both traditional and modern styles, with newer headers placed in the std namespace. Keywords like class, public, and virtual allow defining classes and controlling access to members. Functions can be overloaded if their signatures differ.
This document provides an introduction to the C programming language. It discusses the basic structure of C programs, including the main function, use of comments, and variable declaration. It also covers the four main data types (integer, float, double, character), and how variables can be initialized and assigned values. The document demonstrates basic input/output using printf statements and formatting specifiers.
This document provides a list of 20 frequently asked Python interview questions and their answers. Some of the key topics covered include what Python is, its advantages like being free and open source, PEP 8 coding style guidelines, memory management in Python using a private heap and garbage collector, namespaces, iterators, generators, slicing, dictionaries, and differences between Python 2.x and 3.x.
The document provides an overview of C# and .NET concepts including:
- C# versions from 1.0 to 5.0 and new features introduced in each version such as generics, LINQ, lambda expressions etc.
- .NET Framework concepts such as Common Language Runtime (CLR), Just-In-Time (JIT) compilation, garbage collection.
- Value types vs reference types, stack vs heap memory.
- Language Integrated Query (LINQ) and expression trees.
- Various C# language concepts are demonstrated through code examples.
This document provides an overview of the C programming language. It discusses that C was developed in the 1970s as a system programming language and is still widely used today. The document outlines key features of C including data types, operators, expressions, input/output functions, and the basic structure of a C program with function definitions and variable declarations. It also describes basic program elements in C like variables, constants, and data types in detail.
Learning c - An extensive guide to learn the C LanguageAbhishek Dwivedi
This document covers entire C language thoroughly. Its for all the students or professionals who would like to learn C or would like to brush up their knowledge with a quick recap.
This document discusses the role and implementation of a lexical analyzer. It begins by explaining that the lexical analyzer is the first phase of a compiler that reads source code characters and produces tokens for the parser. It describes how the lexical analyzer interacts with the parser by returning tokens when requested. The document then discusses several tasks of the lexical analyzer, including stripping comments and whitespace, tracking line numbers for errors, and preprocessing macros. It also covers concepts like tokens, patterns, lexemes, and attributes. Finally, it provides an example input and output of a lexical analyzer tokenizing a C program.
This document provides 50 interview questions on C programming language organized into 5 chapters: Variables & Control Flow, Operators, Constants & Structures, Functions, Pointers, and Programs. It aims to help both freshers and experienced programmers quickly brush up on basic C concepts commonly asked during job interviews at top companies. Each question is accompanied by a detailed answer along with code examples where applicable. Feedback is welcomed to be sent to the publisher.
C++ is an object-oriented programming language that is considered intermediate-level as it includes both high-level and low-level features. It was initially called 'C with Classes' but was renamed to C++ in 1983. C++ was created in the early 1980s at Bell Labs by Bjarne Stroustrup and is based on the C language. C++ is called an object-oriented language because it views problems in terms of objects rather than procedures. Key concepts of object-oriented programming in C++ include classes, objects, data abstraction, encapsulation, polymorphism, and inheritance.
C is a middle-level programming language developed in the 1970s at Bell Labs. It is modular, portable, reusable, and features functions, keywords, and standard libraries. C code is written in functions and compiled before being executed on a computer to solve problems.
This document provides an overview of the C programming language. It discusses the origins and development of C from the B programming language. Some key features and benefits of C discussed include its low-level capabilities as a second-generation language, structured programming approach, use of functions and libraries, and support for pointers, memory allocation, recursion, and bit manipulation. The document also covers C's fundamental and derived data types, defining variables and strings, and the structure of C functions including single-level functions.
C was originally developed at AT&T for use in operating systems like UNIX. Bjarne Stroustrup later added object-oriented features to C while working at AT&T, creating the new language C++. C++ allows both procedural and object-oriented programming for efficiency and flexibility. It has since become a widely used language for large-scale software development.
The document outlines the course content for a C++ introductory course, including introductions to OOP concepts like classes and objects, pointers, functions, inheritance, and polymorphism. It also covers basic C++ programming concepts like I/O, data types, operators, and data structures. The course aims to provide students with fundamental C++ programming skills through explanations and examples of key C++ features.
The document provides an overview of C++ vs C# by Shubhra Chauhan. It discusses the key object-oriented programming concepts like classes, objects, inheritance, polymorphism, and how they are implemented in C++ and C#. It includes code examples to demonstrate class usage and inheritance in both languages. The document also compares some similarities and differences between C++ and C# like support for pointers, preprocessors, structures, and goto statements.
This document discusses object-oriented programming concepts in C#, including constructors, destructors, polymorphism, function overloading, and operator overloading. Constructors initialize objects, destructors release objects from memory, and polymorphism allows one interface to have multiple implementations. Function overloading uses the same name for functions that differ in parameters, while operator overloading extends operators to user-defined types.
Advantages Over Conventional Error Handling in OOPRaju Dawadi
This document discusses the advantages of object-oriented programming (OOP) error handling using exceptions over conventional error handling methods. Conventional error handling directly terminates programs or returns error codes on failure. Exceptions allow errors to be caught and handled without program termination, improve code isolation and readability, and help communicate errors through the call stack. Benefits of exceptions include separating error handling code, selectively trapping different exceptions, streamlined debugging, and more efficient and readable code.
C is a procedural programming language. It was developed in the early 1970s and is still widely used. The document provides an overview of key aspects of C including data types, variables, constants, operators, control statements like if/else, and functions. It also discusses C programming concepts like low-level vs high-level languages, header files, comments, escape sequences, and more. The document serves as a useful introduction and reference for someone learning the basics of the C programming language.
The document discusses keywords, identifiers, literals, punctuators, and data types in the C# programming language. It defines each concept and provides examples. Keywords are reserved words that implement language features. Identifiers name variables and cannot contain two underscores. Literals assign values to variables and include numbers, characters, strings, and escape sequences. Punctuators separate operations involving operands. Data types specify the size and type of values stored in variables, including primitive types like integers and floating-point, as well as reference types.
This document provides an overview of C++ programming concepts including:
1. C++ programs consist of functions, with every program containing a main() function. Functions contain declarations, statements, comments, and can call libraries.
2. Variables must be declared with a type and can be used to store values. C++ supports integer, floating point, character, and other variable types.
3. C++ allows selection and decision making using if/else statements, switch statements, logical operators, and loops like while and for. Operators allow comparisons and boolean evaluations.
The document provides an overview of Microsoft Visual C# and C# basics. It covers topics like getting started with a first C# program, data types, operators, control statements, namespaces, objects and types, methods, classes, structs, inheritance, interfaces, polymorphism, arrays, generics, collections, memory management, attributes, exceptions and more. It also discusses C# compiler options, console I/O formatting, comments, and directives.
This document introduces key concepts in Java programming including data types, identifiers, variable declarations, constants, comments, arithmetic operations, input/output, and the Scanner and JOptionPane classes. It defines identifiers as names for classes, methods, and variables that must start with a letter or underscore. It describes primitive and non-primitive data types. It explains that variables store values in memory locations and are declared with a type and name. Constants are variables that cannot change value once assigned. Comments are used to explain code. The Scanner class reads input and JOptionPane displays dialog boxes.
The document provides an overview of key concepts in C++, including:
1) C++ adds object-oriented programming capabilities to C while maintaining C's power and flexibility. It was created in 1979 to provide object-oriented programming features to C.
2) Object-oriented programming encourages breaking problems into constituent parts called objects that contain related instructions and data. The three main traits of OOP are encapsulation, polymorphism, and inheritance.
3) C++ supports both traditional and modern styles, with newer headers placed in the std namespace. Keywords like class, public, and virtual allow defining classes and controlling access to members. Functions can be overloaded if their signatures differ.
This document provides an introduction to the C programming language. It discusses the basic structure of C programs, including the main function, use of comments, and variable declaration. It also covers the four main data types (integer, float, double, character), and how variables can be initialized and assigned values. The document demonstrates basic input/output using printf statements and formatting specifiers.
This document provides a list of 20 frequently asked Python interview questions and their answers. Some of the key topics covered include what Python is, its advantages like being free and open source, PEP 8 coding style guidelines, memory management in Python using a private heap and garbage collector, namespaces, iterators, generators, slicing, dictionaries, and differences between Python 2.x and 3.x.
The document provides an overview of C# and .NET concepts including:
- C# versions from 1.0 to 5.0 and new features introduced in each version such as generics, LINQ, lambda expressions etc.
- .NET Framework concepts such as Common Language Runtime (CLR), Just-In-Time (JIT) compilation, garbage collection.
- Value types vs reference types, stack vs heap memory.
- Language Integrated Query (LINQ) and expression trees.
- Various C# language concepts are demonstrated through code examples.
This document provides an overview of the C programming language. It discusses that C was developed in the 1970s as a system programming language and is still widely used today. The document outlines key features of C including data types, operators, expressions, input/output functions, and the basic structure of a C program with function definitions and variable declarations. It also describes basic program elements in C like variables, constants, and data types in detail.
Learning c - An extensive guide to learn the C LanguageAbhishek Dwivedi
This document covers entire C language thoroughly. Its for all the students or professionals who would like to learn C or would like to brush up their knowledge with a quick recap.
This document discusses the role and implementation of a lexical analyzer. It begins by explaining that the lexical analyzer is the first phase of a compiler that reads source code characters and produces tokens for the parser. It describes how the lexical analyzer interacts with the parser by returning tokens when requested. The document then discusses several tasks of the lexical analyzer, including stripping comments and whitespace, tracking line numbers for errors, and preprocessing macros. It also covers concepts like tokens, patterns, lexemes, and attributes. Finally, it provides an example input and output of a lexical analyzer tokenizing a C program.
This document provides 50 interview questions on C programming language organized into 5 chapters: Variables & Control Flow, Operators, Constants & Structures, Functions, Pointers, and Programs. It aims to help both freshers and experienced programmers quickly brush up on basic C concepts commonly asked during job interviews at top companies. Each question is accompanied by a detailed answer along with code examples where applicable. Feedback is welcomed to be sent to the publisher.
C++ is an object-oriented programming language that is considered intermediate-level as it includes both high-level and low-level features. It was initially called 'C with Classes' but was renamed to C++ in 1983. C++ was created in the early 1980s at Bell Labs by Bjarne Stroustrup and is based on the C language. C++ is called an object-oriented language because it views problems in terms of objects rather than procedures. Key concepts of object-oriented programming in C++ include classes, objects, data abstraction, encapsulation, polymorphism, and inheritance.
C is a middle-level programming language developed in the 1970s at Bell Labs. It is modular, portable, reusable, and features functions, keywords, and standard libraries. C code is written in functions and compiled before being executed on a computer to solve problems.
This document provides an overview of the C programming language. It discusses the origins and development of C from the B programming language. Some key features and benefits of C discussed include its low-level capabilities as a second-generation language, structured programming approach, use of functions and libraries, and support for pointers, memory allocation, recursion, and bit manipulation. The document also covers C's fundamental and derived data types, defining variables and strings, and the structure of C functions including single-level functions.
C was originally developed at AT&T for use in operating systems like UNIX. Bjarne Stroustrup later added object-oriented features to C while working at AT&T, creating the new language C++. C++ allows both procedural and object-oriented programming for efficiency and flexibility. It has since become a widely used language for large-scale software development.
The document outlines the course content for a C++ introductory course, including introductions to OOP concepts like classes and objects, pointers, functions, inheritance, and polymorphism. It also covers basic C++ programming concepts like I/O, data types, operators, and data structures. The course aims to provide students with fundamental C++ programming skills through explanations and examples of key C++ features.
The document provides an overview of C++ vs C# by Shubhra Chauhan. It discusses the key object-oriented programming concepts like classes, objects, inheritance, polymorphism, and how they are implemented in C++ and C#. It includes code examples to demonstrate class usage and inheritance in both languages. The document also compares some similarities and differences between C++ and C# like support for pointers, preprocessors, structures, and goto statements.
This document discusses object-oriented programming concepts in C#, including constructors, destructors, polymorphism, function overloading, and operator overloading. Constructors initialize objects, destructors release objects from memory, and polymorphism allows one interface to have multiple implementations. Function overloading uses the same name for functions that differ in parameters, while operator overloading extends operators to user-defined types.
Advantages Over Conventional Error Handling in OOPRaju Dawadi
This document discusses the advantages of object-oriented programming (OOP) error handling using exceptions over conventional error handling methods. Conventional error handling directly terminates programs or returns error codes on failure. Exceptions allow errors to be caught and handled without program termination, improve code isolation and readability, and help communicate errors through the call stack. Benefits of exceptions include separating error handling code, selectively trapping different exceptions, streamlined debugging, and more efficient and readable code.
Implementation details and performance traits of generics in .NET, Java and C++. Presentation for the Jerusalem .NET/C++ User Group by Sasha Goldshtein.
This document discusses subprograms in programming languages. It covers the fundamentals of subprograms including definitions, parameters, and parameter passing methods. Key points include:
- A subprogram has a single entry point and control returns to the caller when execution terminates. Parameters can be passed by value, reference, result, or name.
- Issues around subprograms include parameter type checking, local variable scope, and parameter passing semantics and implementation. Languages support different parameter passing methods like pass-by-value or pass-by-reference.
- Parameter passing methods have tradeoffs between efficiency and aliasing. Multidimensional arrays as parameters require type information to be passed correctly in some languages. Subprograms can also
This document discusses collections in C#. It defines collections as enumerable data structures that can be accessed using indexes or keys. It then covers the different types of collections in C#, including stacks, queues, lists, and dictionaries. Examples are provided for queues, arrays, arraylists, and dictionaries to illustrate how they can be used.
A basic course on Research data management: part 1 - part 4Leon Osinski
Slides belonging to a basic course on research data management. The course consists of 4 parts:
Part 1: what and why
1.1 data management plans
Part 2: protecting and organizing your data
2.1 data safety and data security
2.2 file naming, organizing data (TIER documentation protocol)
Part 3: sharing your data
3.1 via collaboration platforms (during research)
3.2 via data archives (after your research)
Part 4: caring for your data, or making data usable
4.1 tidy data
4.2 documentation/metadata
4.3 licenses
4.4 open data formats
PL/SQL is a programming language that combines the SQL operations of querying and manipulating data in an Oracle database with the procedural language constructs of variables, conditions, and loops. PL/SQL can be used for database-side programming as well as client-side application development. It provides advantages like better performance, portability, higher productivity, and integration with Oracle. PL/SQL supports various data types, control structures, exception handling, and object-oriented programming features. Cursors allow processing of multiple rows returned from a SQL statement and can be static, dynamic, or reference types. Procedures and functions are reusable program units that allow passing parameters and returning values.
This document discusses exception handling in Java. It defines exceptions as objects that describe errors during code execution. The try, catch, and finally keywords are used to handle exceptions. Exceptions can be generated by the Java runtime system or manually coded. The try block contains code that could cause exceptions. Catch blocks handle specific exception types. Finally blocks contain cleanup code. All exceptions extend the Throwable class. The Exception class is for program exceptions, while Error is for environmental errors. Uncaught exceptions use the default exception handler.
Logic programming deals with relations rather than functions. It separates logic from control by having the programmer declare facts and relations that are true, while the system determines how to use those facts to solve problems. Horn clauses are used to specify relations, with the consequent stating what is true if the conjunction of antecedents are true. Queries in Prolog can ask if a specific tuple belongs to a relation or if there exists a value for a variable such that a clause is true.
The document discusses generics in C#, explaining that generics allow defining type-safe data structures without committing to actual data types, improving performance and code quality. It covers why generics are required by discussing issues with non-generic stacks, and describes generic type parameters, constraints, methods, delegates and event handling using generics.
The document discusses C# delegates and events. It defines a delegate as a class that encapsulates a method signature and can be used to pass methods as parameters. Delegates allow methods to be assigned and invoked dynamically. Events are a special type of delegate used to define callbacks that are invoked when an event occurs. The document provides examples of singlecast and multicast delegates, declaring and using delegates, and creating a custom delegate and event.
This document provides an overview and instructions for using Oracle's SQL Fundamentals II course. It discusses copyright and usage restrictions, outlines the course objectives and prerequisites. It also lists additional resources for SQL and describes the HR schema used in examples.
This document discusses subprograms and parameter passing in programming languages. It covers fundamental concepts of subprograms like definitions, calls, headers, and parameters. It then describes different parameter passing methods like pass-by-value, pass-by-reference, and pass-by-name. It also discusses how major languages like C, C++, Java, Ada, C#, and PHP implement parameter passing and type checking.
The document discusses different software engineering process models including:
1. The waterfall model which is a linear sequential model where each phase must be completed before moving to the next.
2. Prototyping models which allow requirements to be refined through building prototypes.
3. RAD (Rapid Application Development) which emphasizes short development cycles through reuse and code generation.
4. Incremental models which deliver functionality in increments with early increments focusing on high priority requirements.
5. The spiral model which has multiple iterations of planning, risk analysis, engineering and evaluation phases.
Constructor is a special method in Java that is used to initialize objects. It has the same name as the class and is invoked automatically when an object is created. Constructors can be used to set default values for objects. A class can have multiple constructors as long as they have different parameters. Constructors are used to provide different initial values to objects and cannot return values.
The document discusses e-commerce business models, outlining seven unique features that define an e-business model including value proposition, revenue model, market opportunity, competitive environment, competitive advantage, market strategy, and organizational development. It then describes the multistage model for e-commerce consisting of search and identification, selection and negotiation, purchasing electronically, product delivery, and after-sales service. Finally, it lists some major business-to-consumer and business-to-business e-commerce business models.
The document discusses different types of constructors in C#, including default, parameterized, copy, static, and private constructors. It provides examples of how to define each type of constructor and how they are used. The key points are:
- Constructors initialize objects and are invoked automatically upon object creation. They have the same name as the class.
- Default constructors require no parameters, while parameterized constructors allow passing parameters to initialize object properties differently.
- Copy constructors initialize a new object with the values of an existing object of the same class. Static constructors run only once and initialize static members, while private constructors restrict object creation.
The document discusses different types of constructors in C#, including default, parameterized, copy, static, and private constructors. It provides examples of how to define each type of constructor and describes their purposes and usage. A constructor is a special method that initializes an object when it is created. It allows passing initial values to object properties and performs other initialization procedures.
The document discusses classes, objects, constructors, and other object-oriented programming concepts in C#:
1) A class defines the data and behavior of a type using variables, methods, and events. Objects are instances of classes that have identity, data, and behaviors defined by the class.
2) Constructors initialize objects and are called using the new keyword. Constructors can be overloaded, parameterized, static, or chained to call another constructor.
3) Classes support concepts like inheritance, hiding, overriding, and polymorphism to extend and customize behavior in derived classes. References and values can be passed into methods.
Constructors and destructors are special member functions in C++ that are used to initialize and cleanup objects. Constructors are called automatically when an object is created and are used to set initial values for object attributes. Destructors are called automatically when an object is destroyed and can perform cleanup tasks. There are different types of constructors like default, parameterized, and copy constructors. Destructors do not have parameters and are used to deallocate memory when objects are destroyed.
Constructors and destructors are special member functions in C++ that are used to initialize and cleanup objects. Constructors are called automatically when an object is created and are used to set initial values for object attributes. Destructors are called automatically when an object is destroyed and can perform cleanup tasks. There are different types of constructors like default, parameterized, and copy constructors. Constructors and destructors have the same name as the class but constructors don't have a return type while destructors are preceded by a tilde (~).
Constructors are special member functions that are used to initialize objects. There are three main types of constructors: default constructors that take no arguments, parameterized constructors that allow passing arguments, and copy constructors that are used to initialize one object from another of the same type. Destructors are special member functions that are automatically called to destroy objects when they go out of scope or the program terminates. Constructors and destructors are important concepts in object-oriented programming with C++.
Constructors initialize objects when they are created and can be used to set initial values for object attributes. Destructors are called automatically when objects are destroyed. This document discusses various types of constructors like default, copy, parameterized constructors. It also covers constructor overloading and destructors.
Constructors are special methods that are automatically invoked when objects are created. They initialize the object's data members. There are default and parameterized constructors. A copy constructor initializes an object from another existing object of the same class. Destructors destruct objects and are invoked automatically when objects go out of scope. They have the same name as the class but prefixed with a tilde.
Constructor and Destructor in C++ are special member functions that are automatically called by the compiler.
Constructors initialize a newly created object and are called when the object is created. Destructors destroy objects and release memory and are called when the object goes out of scope. There are different types of constructors like default, parameterized, and copy constructors that allow initializing objects in different ways. Destructors do not have arguments or return values and are declared with a tilde symbol preceding the class name.
Constructors are special class functions which performs initialization of every object. The Compiler calls the Constructor whenever an object is created. Destructor on the other hand is used to destroy the class object.
Slide 2:
What are the Constructor & destructor ?
Slide 3:
Characteristics of Constructor
Slide 4:
Special CHaracteristics of Destructor
Slide 5:
Similarities
Slide 6:
Dissimilarities
Slides 7:
Default Constructor with example
Slide 8:
Parameterized Constructor
Slide 9:
Copy Constructor with example
Slide 10:
Destructor
Slide 11:
Bibliography
The document discusses the concept of constructors in Java. It defines a constructor as a special method that initializes an object immediately upon creation and has the same name as the class. The document explains different types of constructors - default, explicit, parameterized, and overloaded constructors. It provides examples to illustrate these constructor types and how they are used to initialize object properties. The key differences between methods and constructors are also outlined.
This document discusses various C++ constructor and destructor concepts including:
- Constructors are special methods that initialize object data members when created and can be parameterized to initialize with different values.
- Classes can contain multiple constructors and constructors with default arguments.
- Copy constructors initialize objects using another object of the same class.
- Const objects can only access const member functions and attempts to modify will generate errors.
- Destructors are used to destroy objects and release memory, and their name matches the class name preceded by a tilde. They do not take arguments or return values.
Operator overloading allows operators like +, -, *, etc. to be used with user-defined types by defining specific method implementations. It enables operations on user-defined classes to behave similarly to built-in types. The document provides examples of overloading unary and binary operators in C# classes to change the sign of a number and add two calculator objects respectively. It also discusses the different operators that can and cannot be overloaded and how to define the operator overloading methods with the correct return types and parameters.
The document discusses key concepts of classes and objects in C# including defining classes, adding variables and methods, member access modifiers, creating objects, constructors, static members, private constructors, and indexers. It defines classes as user defined data types that can encapsulate data as fields and functions as methods. Objects are instances of classes that allow data and methods to be accessed. Constructors initialize objects, while static members are associated with the class rather than individual objects.
This document provides an introduction to classes in C++, including constructors, destructors, class members, inheritance, and errors. It defines a class called MyCoordinate with members like x, y, and an array. It discusses using constructors to initialize members and destructors to clean up memory. The document also covers defining classes with public and private members and inheriting from parent classes.
Constructor are almost similar to methods except for two things
Name is same as the class name
It has no return type
Constructor in java is used to create the instance of the class
- Constructors are special member functions that are used to initialize objects of a class. They are automatically called when an object is created.
- There are different types of constructors including default, parameterized, and copy constructors. Default constructors take no parameters while parameterized constructors allow passing initial values.
- Constructors can be explicitly or implicitly called. Implicit calls are made when an object is declared while explicit calls directly call the constructor. Constructors ensure objects are properly initialized.
Walmart Business+ and Spark Good for Nonprofits.pdfTechSoup
"Learn about all the ways Walmart supports nonprofit organizations.
You will hear from Liz Willett, the Head of Nonprofits, and hear about what Walmart is doing to help nonprofits, including Walmart Business and Spark Good. Walmart Business+ is a new offer for nonprofits that offers discounts and also streamlines nonprofits order and expense tracking, saving time and money.
The webinar may also give some examples on how nonprofits can best leverage Walmart Business+.
The event will cover the following::
Walmart Business + (https://business.walmart.com/plus) is a new shopping experience for nonprofits, schools, and local business customers that connects an exclusive online shopping experience to stores. Benefits include free delivery and shipping, a 'Spend Analytics” feature, special discounts, deals and tax-exempt shopping.
Special TechSoup offer for a free 180 days membership, and up to $150 in discounts on eligible orders.
Spark Good (walmart.com/sparkgood) is a charitable platform that enables nonprofits to receive donations directly from customers and associates.
Answers about how you can do more with Walmart!"
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).
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.
it describes the bony anatomy including the femoral head , acetabulum, labrum . also discusses the capsule , ligaments . muscle that act on the hip joint and the range of motion are outlined. factors affecting hip joint stability and weight transmission through the joint are summarized.
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxEduSkills OECD
Iván Bornacelly, Policy Analyst at the OECD Centre for Skills, OECD, presents at the webinar 'Tackling job market gaps with a skills-first approach' on 12 June 2024
Main Java[All of the Base Concepts}.docxadhitya5119
This is part 1 of my Java Learning Journey. This Contains Custom methods, classes, constructors, packages, multithreading , try- catch block, finally block and more.
Strategies for Effective Upskilling is a presentation by Chinwendu Peace in a Your Skill Boost Masterclass organisation by the Excellence Foundation for South Sudan on 08th and 09th June 2024 from 1 PM to 3 PM on each day.
Leveraging Generative AI to Drive Nonprofit InnovationTechSoup
In this webinar, participants learned how to utilize Generative AI to streamline operations and elevate member engagement. Amazon Web Service experts provided a customer specific use cases and dived into low/no-code tools that are quick and easy to deploy through Amazon Web Service (AWS.)
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...PECB
Denis is a dynamic and results-driven Chief Information Officer (CIO) with a distinguished career spanning information systems analysis and technical project management. With a proven track record of spearheading the design and delivery of cutting-edge Information Management solutions, he has consistently elevated business operations, streamlined reporting functions, and maximized process efficiency.
Certified as an ISO/IEC 27001: Information Security Management Systems (ISMS) Lead Implementer, Data Protection Officer, and Cyber Risks Analyst, Denis brings a heightened focus on data security, privacy, and cyber resilience to every endeavor.
His expertise extends across a diverse spectrum of reporting, database, and web development applications, underpinned by an exceptional grasp of data storage and virtualization technologies. His proficiency in application testing, database administration, and data cleansing ensures seamless execution of complex projects.
What sets Denis apart is his comprehensive understanding of Business and Systems Analysis technologies, honed through involvement in all phases of the Software Development Lifecycle (SDLC). From meticulous requirements gathering to precise analysis, innovative design, rigorous development, thorough testing, and successful implementation, he has consistently delivered exceptional results.
Throughout his career, he has taken on multifaceted roles, from leading technical project management teams to owning solutions that drive operational excellence. His conscientious and proactive approach is unwavering, whether he is working independently or collaboratively within a team. His ability to connect with colleagues on a personal level underscores his commitment to fostering a harmonious and productive workplace environment.
Date: May 29, 2024
Tags: Information Security, ISO/IEC 27001, ISO/IEC 42001, Artificial Intelligence, GDPR
-------------------------------------------------------------------------------
Find out more about ISO training and certification services
Training: ISO/IEC 27001 Information Security Management System - EN | PECB
ISO/IEC 42001 Artificial Intelligence Management System - EN | PECB
General Data Protection Regulation (GDPR) - Training Courses - EN | PECB
Webinars: https://pecb.com/webinars
Article: https://pecb.com/article
-------------------------------------------------------------------------------
For more information about PECB:
Website: https://pecb.com/
LinkedIn: https://www.linkedin.com/company/pecb/
Facebook: https://www.facebook.com/PECBInternational/
Slideshare: http://www.slideshare.net/PECBCERTIFICATION
1. Inheritance
using System;
public class Parent
{
string parentString;
public Parent()
{
Console.WriteLine("Parent Constructor.");
}
public Parent(string myString)
{
parentString = myString;
Console.WriteLine(parentString);
}
public void print()
{
Console.WriteLine("I'm a Parent Class.");
}
}
.
2. public class Child : Parent
{
public Child() : base("From Derived")
{
Console.WriteLine("Child Constructor.");
}
public new void print()
{
base.print();
Console.WriteLine("I'm a Child Class.");
}
public static void Main()
{
Child child = new Child();
child.print();
}
}
4. Class and its members in C#.NET
•
To create a class, use the keyword class and has the following syntax.
• [Access Modifier] class ClassName
• {
• -
• -
• -
• }
• A class can be created with only two access modifiers, public and internal.
Default is public. When a class is declared as public, it can be accessed
within the same assembly in which it was declared as well as from out side
the assembly. But when the class is created as internal then it can be
accessed only within the same assembly in which it was declared.
5. Class and its members in C#.NET
Members of a Class
A class can have any of the following members.
• Fields
• Properties
• Methods
• Events
• Constructors
• Destructor
• Operators
• Indexers
• Delegates
• Fields : A field is the variable created within the class and it is used to store data of
the class. In general fields will be private to the class for providing security for the
data
• Syntax : [Access Modifier] DataType Fieldname;
6. Class and its members in C#.NET
• Properties : A property is a method of the class that appears to the
user as a field of the class. Properties are used to provide access to
the private fields of the class. In general properties will be public.
• Syntax : [Access Modifier] DataType PropName
• {
• Get
• {
• }
• Set
• {
• }
• }
• A property contains two accessors, get and set.
7. Class and its members in C#.NET
• When user assigns a value to the property, the set accessor of the property will be
automatically invoked AND VALUE ASSIGNED to the property will be passed to set
accessor with the help of an implicit object called value. Hence set accessor is used
to set the value to private field. Within the set accessor you can perform validation
on value before assigning it to the private field.
When user reads a property, then the get accessor of the property is automatically
invoked. Hence get accessor is used to write the code to return the value stored in
private field.
• Readonly Property : There may be a situation where you want to allow the user to
read the property and not to assign a value to the property. In this case property
has to be created as readonly property and for this create the property only with
get accessor without set accessor.
• Syntax : [Access Modifier] DataType PropName
• {
• Get
• {
• }
• }
8. Class and its members in C#.NET
• Writeonly Property : There may be a situation where you want to
allow the user to assign a value to the property and not to read the
property. In this case property has to be created as writeonly
property and for this create the property only with set accessor
without get accessor.
• Syntax : [Access Modifier] DataType PropName
• {
• Set
• {
• }
• }
• Methods
• Methods are nothing but functions created within the class.
Functions are used to specify various operations that can be
performed on data represented by the class.
9. Class and its members in C#.NET
• class MyClass
{
private int x;
public void SetX(int i)
{
x = i;
}
public int GetX()
{
return x;
}
}
class MyClient
{
public static void Main()
{
MyClass mc = new MyClass();
mc.SetX(10);
int xVal = mc.GetX();
Console.WriteLine(xVal);//Displays 10
}
}
10. Example program for property and
method of a class
• using System;
namespace example
{
class programCall
{
int n; //instance variable
//property nn to access private field n
public int nn
{
set { n = value; }
get { return n; }
}
11. Example program for property and
method of a class
• //declare a method to print field n value
//by default members of class will be private , so to access explictly declare public
public void print()
{
Console.WriteLine(n);
}
}
class MainClass
{
static void Main(string[] args)
{
//creating object to class programcall
programCall objpc = new programCall();
12. Example program for property and
method of a class
• //instance members can only be accessed with an instance
objpc.nn = 99999;
objpc.print();
Console.Read();
}
}
}
•
Output
99999
13. Constructor in C#.NET
• A special method of the class that will be automatically invoked when an instance
of the class is created is called as constructor.
Constructors are mainly used to initialize private fields of the class while creating
an instance for the class.
When you are not creating a constructor in the class, then compiler will
automatically create a default constructor in the class that initializes all numeric
fields in the class to zero and all string and object fields to null.
To create a constructor, create a method in the class with same name as class and
has the following syntax.
[Access Modifier] ClassName([Parameters])
• {
• }
•
14. Constructor in C#.NET
• Example program using Constructors
using System;
class ProgramCall
{
int i, j;
//default contructor
public ProgramCall()
{
i = 45;
j = 76;
}
15. Constructor in C#.NET
• public static void Main()
{
//When an object is created , contructor is called
ProgramCall obj = new ProgramCall();
Console.WriteLine(obj.i);
Console.WriteLine(obj.j);
Console.Read();
}
}
•
OUTPUT
45
76
16. Constructor types with example
programs in C#.NET
• A special method of the class that will be
automatically invoked when an instance of the
class is created is called as constructor.
Constructors can be classified
• Default Constructor
• Parameterized Constructor
• Copy Constructor
• Private Constructor
17. Constructor types
• Default Constructor : A constructor without any parameters is called as default constructor.
Drawback of default constructor is every instance of the class will be initialized to same values and
it is not possible to initialize each instance of the class to different values.
Example for Default Constructor
Parameterized Constructor : A constructor with at least one parameter is called as parameterized
constructor. Advantage of parameterized constructor is you can initialize each instance of the class
to different values.
Example for Parameterized Constructor
• using System;
namespace ProgramCall
{
class Test1
{
//Private fields of class
int A, B;
18. Constructor types
• //default Constructor
public Test1()
{
A = 10;
B = 20;
}
//Paremetrized Constructor
public Test1(int X, int Y)
{
A = X;
B = Y;
}
//Method to print
public void Print()
{
Console.WriteLine("A = {0}tB = {1}", A, B);
}
}
19. Constructor types
•
class MainClass
{
static void Main()
{
Test1 T1 = new Test1(); //Default Constructor is called
Test1 T2 = new Test1(80, 40); //Parameterized Constructor is called
T1.Print();
T2.Print();
Console.Read();
}
}
}
•
Output
A = 10 B = 20
A = 80 B = 40
20. Constructor types
• Copy Constructor : A parameterized constructor that contains a parameter of same class type is
called as copy constructor. Main purpose of copy constructor is to initialize new instance to the
values of an existing instance.
Example for Copy Constructor
using System;
namespace ProgramCall
{
class Test2
{
int A, B;
public Test2(int X, int Y)
{
A = X;
B = Y;
}
21. Constructor types
• //Copy Constructor
public Test2(Test2 T)
{
A = T.A;
B = T.B;
}
public void Print()
{
Console.WriteLine("A = {0}tB = {1}", A, B);
}
}
class CopyConstructor
{
static void Main()
{
22. Constructor types
• Test2 T2 = new Test2(80, 90);
//Invoking copy constructor
Test2 T3 = new Test2(T2);
T2.Print();
T3.Print();
Console.Read();
}
}
}
•
Output
A = 80 B = 90
A = 80 B = 90
23. Constructor types
Private Constructor : You can also create a constructor as
private. When a class contains at least one private
constructor, then it is not possible to create an instance for
the class. Private constructor is used to restrict the class
from being instantiated when it contains every member as
static.
Some unique points related to constructors are as follows
• A class can have any number of constructors.
• A constructor doesn’t have any return type even void.
• A static constructor can not be a parameterized
constructor.
• Within a class you can create only one static constructor.
24. Destructor in C#.NET
•
A destructor is a special method of the class that is automatically invoked while an instance of the
class is destroyed. Destructor is used to write the code that needs to be executed while an instance
is destroyed. To create a destructor, create a method in the class with same name as class preceded
with ~ symbol.
Syntax :
~ClassName()
{
• }
Example : The following example creates a class with one constructor and one destructor. An
instance is created for the class within a function and that function is called from main. As the
instance is created within the function, it will be local to the function and its life time will be
expired immediately after execution of the function was completed.
25. Destructor in C#.NET
• using System;
namespace ProgramCall
{
class myclass
{
public myclass()
{
Console.WriteLine("An Instance Created");
}
//destructor
~myclass()
{
Console.WriteLine("An Instance Destroyed");
}
}
26. Destructor in C#.NET
•
class Destructor
{
public static void Create()
{
myclass T = new myclass();
}
static void Main()
{
Create();
GC.Collect();
Console.Read();
}
}
}
• Output
An Instance Created
An Instance Destroyed
27. Polymorphism in C#
• When a message can be processed in different ways is called
polymorphism. Polymorphism means many forms.
• Polymorphism is one of the fundamental concepts of OOP.
• Polymorphism provides following features:
• It allows you to invoke methods of derived class through base class
reference during runtime.
• It has the ability for classes to provide different implementations of
methods that are called through the same name.
• Polymorphism is of two types:
• Compile time polymorphism/Overloading
• Runtime polymorphism/Overriding
• Compile Time Polymorphism
• Compile time polymorphism is
method and
operators overloading.
• In method overloading method performs the different task at the different
input parameters.
28. Polymorphism in C#
• Runtime Time Polymorphism
• Runtime time polymorphism is done using inheritance and virtual
functions. Method overriding is called runtime polymorphism. It is also
called late binding.
• When overriding a method, you change the behavior of the method for
the derived class. Overloading a method simply involves having another
method with the same prototype.
• Caution: Don't confused method overloading with method
overriding, they are different, unrelated concepts. But they sound similar.
• Method overloading has nothing to do with inheritance or virtual
methods.
• Following are examples of methods having different overloads:
• void area(int side);
• void area(int l, int b);
• void area(float radius);
29. Polymorphism in C#
• Practical example of Method Overloading (Compile Time Polymorphism)
• using System;
• namespace method_overloading
• {
• class Program
• {
• public class Print
• {
• public void display(string name)
• {
• Console.WriteLine("Your name is : " + name);
• }
• public void display(int age, float marks)
• {
• Console.WriteLine("Your age is : " + age);
• Console.WriteLine("Your marks are :" + marks);
• }
30. Polymorphism in C#
• }
• static void Main(string[] args)
• {
• Print obj = new Print();
• obj.display("George");
• obj.display(34, 76.50f);
• Console.ReadLine();
• }
• }
• }
• Note: In the code if you observe display method is called two times.
Display method will work according to the number of parameters
and type of parameters.
31. Polymorphism in C#
• When and why to use method overloading
• Use method overloading in situation where you want a class to be able to do something, but there
is more than one possibility for what information is supplied to the method that carries out the
task.
• You should consider overloading a method when you for some reason need a couple of methods
that take different parameters, but conceptually do the same thing.
• Method Overloading showing many forms.
• using System;
• namespace method_overloading_polymorphism
• {
• class Program
• {
• public class Shape
• {
• public void Area(float r)
• {
• float a = (float)3.14 * r;
• // here we have used funtion overload with 1 parameter.
• Console.WriteLine("Area of a circle: {0}",a);
• }
32. Polymorphism in C#
• public void Area(float l, float b)
• {
• float x = (float)l* b;
• // here we have used funtion overload with 2 parameters.
• Console.WriteLine("Area of a rectangle: {0}",x);
• }
• public void Area(float a, float b, float c)
• {
• float s = (float)(a*b*c)/2;
• // here we have used funtion overload with 3 parameters.
• Console.WriteLine("Area of a circle: {0}", s);
• }
• }
33. Polymorphism in C#
• static void Main(string[] args)
• {
• Shape ob = new Shape();
• ob.Area(2.0f);
• ob.Area(20.0f,30.0f);
• ob.Area(2.0f,3.0f,4.0f);
• Console.ReadLine();
• }
• }
• }
• Things to keep in mind while method overloading
• If you use overload for method, there are couple of restrictions that the compiler imposes.
• The rule is that overloads must be different in their signature, which means the name and the
number and type of parameters.
• There is no limit to how many overload of a method you can have. You simply declare them in a
class, just as if they were different methods that happened to have the same name.
34. Method overriding
• class BaseClass
{
public virtual string YourCity()
{
return "New York";
}
}
class DerivedClass : BaseClass
{
public override string YourCity()
{
return "London";
}
}
class Program
{
static void Main(string[] args)
{
DerivedClass obj = new DerivedClass();
string city = obj.YourCity();
Console.WriteLine(city);
Console.Read();
}
} }
•