Skip to content
VUBuddy

CS411 Midterm Solved Subjective by Junaid

Visual Programming PDF 4.1 MBUpdated 23 Oct 2026
Midterm past paper CS411 Midterm Solved Subjective by Junaid PDF 4.1 MB
vubuddy.com
Type
Midterm past paper
Course
CS411 Visual Programming
Size
PDF 4.1 MB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 4.1 MB

You get 3 free files a day on the website. Add the Chrome extension for 30 a day.

Unlimited downloads in the Android app Get it free on Google Play

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.

// this is the delegate declaration · public delegate int Comparer(object obj1, object obj2); · call delegate:

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)

All CS411 files →
CS411 Visual Programming All CS411 handouts, past papers, quizzes and MCQs in one place. Open course page

Get more out of VUBuddy, for free

Android app Free on Google Play
  • Unlimited downloads
  • The explanation behind every MCQ answer
  • Study offline on slow data
Get the Android app
Chrome extension Free on the Chrome Web Store
  • 30 downloads a day instead of 3
  • Sign in and buy Pro Semester here
Add to Chrome

One Pro Semester membership works in both the extension and the app.