- Type
- Midterm past paper
- Course
- CS411 Visual Programming
- Size
- PDF 4.1 MB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extensionSign in with the extension for 30 a day.
Preview text
Text from pages 2, 3, 4 of 35. Download the file for all 35 pages.
1: What are delegates?
A delegate is a reference to a method. It is like function pointers in some other languages. Delegates are used to define callback methods and implement event handling, and they are declared using the “delegate” keyword.
Allow you to develop libraries and classes that are easily
extensible, through delegation, a manager is able to divide the work and allocate it to the subordinates. This helps in reducing his work load so that he can work on important areas such as - planning, business analysis etc.
2: Types of constructor:
In C#, constructors can be divided into 5 types
- Default Constructor.
- Parameterized Constructor.
- Copy Constructor.
- Static Constructor.
- Private Constructor.
3: Explain delegates declare and call delegate:
delegates declare
A delegate is a type that represents references to methods with a particular parameter list and return type. When you instantiate a delegate, you can associate its instance with any method with a compatible signature and return type. You can invoke (or call) the method through the delegate instance.
Delegates can be invoke like a normal function or Invoke() method. Multiple methods can be assigned to the delegate using "+" or "+=" operator and removed using "-" or "-=" operator. It is called multicast delegate. If a multicast delegate returns a value then it returns the value from the last assigned target method.
4: purpose of event driven architecture:
An event-driven architecture uses events to trigger and communicate between decoupled services and is common in modern applications built with microservices. An event is a change in state, or an update, like an item being placed in a shopping cart on an e-commerce website.
5: Attached property in WPF:
An attached property is a Extensible Application Markup Language (XAML) concept. Attached properties enable extra property/value pairs to be set on any XAML element, even though the element doesn't define those extra properties in its object model. The extra properties are globally accessible.
6: Keyboard event:
KeyboardEvent objects describe a user interaction with the keyboard; each event describes a single interaction between the user and a key (or combination of a key with modifier keys) on the keyboard. keyboard events include, keyup, and preview versions of them. KeyEventArgs contains Key, ImeProcessedKey, DeadCharProsessedKey, SystemKey, IsUp, IsDown, IsToggled, KeyStates, IsRepeat, and KeyboardDevice. System. Windows. Input. Keyboard and its PrimaryDevice property are accessible everywhere.
7 :What is the return type of destructor?
Destructors do not have any return type not even void.
8: Why you use “iostream”, write the syntax:
iostream provides basic input and output services for C++ programs. iostream uses the objects cin , cout , cerr , and clog for sending data to and from the standard streams input, output, error (unbuffered), and log (buffered) respectively. #include<iostream.h>
9: What is debugging and its two ways:
Debugging is the process of finding errors during application execution. It does not mean syntax errors, with which the application cannot be compiled, but on logic errors. Logic errors can only be noticed during application execution. Ways of debugging:
Evaluate an expression with or without side effect
- Enable and Disable Just My Code
- Edit and Continue in XAML
Use OzCode
10: What is bytecode in Java?
Java bytecode is the instruction set for the Java Virtual Machine. It acts similar to an assembler which is an alias representation of a C++ code. As soon as a java program is compiled, java bytecode is generated. In more apt terms, java bytecode is the machine code in the form of a . class file.
11: Why most WPF classes are inherently thread-unsafe?
Answer: Most WPF classes derive from dispatcher object and are therefore inherently thread-unsafe. The Dispatcher part of the name refers to wpfs version of a Win32-like message loop,
12: Name the properties supported by the Scale Transform also write its default values of each of Them?
Answer: Scale Transform: Scale Transform enlarges or shrinks an element horizontally, vertically, or in both directions. This transform has four straightforward double properties: . ScaleX—Multiplier for the element’s width (default value = 1) . ScaleY—Multiplier for the element’s height (default value = 1) . CenterX—Origin for horizontal scaling (default value = 0)
Related CS411 files
All CS411 files →- CS411 Midterm Solved File 3 by Team Hadi Midterm PDF 3 MB
- CS411 Midterm Solved MCQs with References by Arslan Midterm PDF 2.7 MB
- CS411 Midterm Current Papers Subjective and Objective Set 2 by Junaid Midterm PDF 2.6 MB
- CS411 Midterm Past Papers Updated by Junaid Midterm PDF 1.8 MB
- CS411 Highlighted Handouts by Sawera Ch Highlighted PDF 13.6 MB
- CS411 Solved Grand Quiz Spring 2021 by Riz Mughal Quiz PDF 901 KB
Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.