Create an Observable Collection. Listen to its Collection Changed Event and display message on UI for each operation.
1. Addition: “Element ‘x’ is added in collection”
2. Removal: “Element ‘x’ is removed from collection”
Use enum NotifyCollectionChangedAction to differentiate the action
Exercise 1: Extension methods on int
1. IsOdd
2. IsEven
3. IsPrime
4. IsDivisibleBy (taking one parameter excluding the first this parameter)
Create a Product-Inventory software (No need of user Input or any other validations)
Product: (Override Equals or implement IEquatable<T>)
1. Id
2. Price
3. IsDefective
Inventory:
1. Dictionary containing all the products and their respective quantities in the inventory
2. Total value of the inventory
Methods
1. Add Product
2. Remove Product
3. Update Product Quantity
On change of Product’s Price, Inventory total value should get updated
If a Product becomes defective, remove it from the inventory.
(Handle them through EventHandler)
Create a list of integers and call where method on it and pass delegate to it in the following ways:
Find odd - Lambda Expression – without curly brackets
Find Even - Lambda Expression – with curly brackets
Find Prime – Anonymous Method
Find Prime Another – Lambda Expression
Find Elements Greater Than Five – Method Group Conversion Syntax
Find Less than Five – Delegate Object in Where – Method Group Conversion Syntax in Constructor of Object
Find 3k – Delegate Object in Where –Lambda Expression in Constructor of Object
Find 3k + 1 - Delegate Object in Where –Anonymous Method in Constructor of Object
Find 3k + 2 - Delegate Object in Where –Lambda Expression Assignment
Find anything - Delegate Object in Where – Anonymous Method Assignment
Find anything - Delegate Object in Where – Method Group Conversion Assignment
Maintain a list of ducks to do following operations
1. Add a duck
2. Remove a duck
3. Remove all ducks
4. Capability to iterate the duck collection in increasing order of their weights. This should be the collections default iteration behaviour
5. Capability to iterate the duck collection in increasing order of number of wings.
Maintain a list
Create an equipment – mobile and immobile
Delete
Move – mobile and immobile (this is going to update certain properties in equipment)
List all equipment. (just the basic details – name and description)
Show details (all details – including distance moved till date and maintenance cost)
List all mobile equipment -> Use Lambda
List all Immobile equipment -> Use Lambda
List all equipment that have not been moved till now
Delete all equipment
Delete all immobile equipment
11Delete all mobile equipment
Create a console application for the above scenario meeting all requirements. Use in-memory objects for storing data. Also make sure to validate user input and show appropriate messages for invalid inputs.
Try using Lambda, Linq, Select, Where query etc. for this assignment
Create a class to store details of student like roll no, name, and course joined and fee paid so far. Assume courses are C# and ASP.NET with course fees being 2000 and 3000.
Write a program using standard string functions that accepts a price of an item and display its coded value. The base of the key is: X C O M P U T E R S 1 2 3 4 5 6 7 8 9 Sample input/output dialogue: Enter price: 489.50 Coded value: PRS.UX
The system is a duck simulation game. There are ducks, each having weight and number of wings. All ducks can fly and quack, but different type of ducks fly and quack differently. For instance, let us consider the following–
1. Rubber ducks don’t fly and squeak.
2. Mallard ducks fly fast and quack loud.
3. Redhead ducks fly slow and quack mild.
All ducks have following common property:
Type of Duck – Use enum to represent this value
Design classes and interfaces for the above story to meet the following requirements -
a. Create a duck
b. Show details of a duck, i.e. when you call for e.g. ShowDetails() method of a duck, duck should print its traits.
User following concepts: class, interfaces, polymorphism etc.
Write a program that will accept the currency value and the name of the country and will display the equivalent in U.S. dollar, based on the given list:
COUNTRY CURRENCY U.S. DOLLAR EQUIVALENT
British Pound 0.6 U.S. dollar
Canadian Dollar 1.3 U.S. dollar
Japanese Yen 140 U.S. dollar
German Mark 1.7 U.S. dollar
Philippines Peso 53 U.S. dollar
Write a program using string functions that will accept the name of the country as input value and will display the corresponding capital. Here is the list of the countries and their capitals.
COUNTRY CAPITAL
Canada Ottawa
United States Washington D.C.
U.S.S.R. Moscow
Italy Rome
Philippines Manila