Documente Academic
Documente Profesional
Documente Cultură
Please go through below video which guides you through on each module in .Net Lounge:
https://www.youtube.com/watch?v=Rm79Rl429NA
1. Application Understanding
Objective
IT applications are all about managing information using a technology. To Create, Read, Update
and Delete information are some of the main operations in all IT applications. Login, Search,
example http://irctc.com/displayServlet is a web application and you can check all operations and
functionalities in this website. Three Tier Architecture is the common architecture used in modern
IT applications. Presentation, Business Logic and Database will be in three different physical
entities.
Desktop Application – is a computer software designed to help the user to perform specific
Web Application - is an application that is accessed over a network such as the Internet or an
Mobile Application - Mobile application software is developed for small low-power handheld
devices such as personal digital assistants, enterprise digital assistants or mobile phones. Eg:
https://www.youtube.com/watch?v=yGogBKK9Sn8
Objective
department. As a result the passenger services also increased. Railway stations increased.
Lakhs of passengers and customers started availing various services like regular ticket bookings,
reservation of tickets, ticket cancellations, enquires etc. Services for passengers and customers
at railway stations resulted in long queues. This created unhappy passengers and customers.
Railway employees were also overburdened with paper and manual work. Dissatisfied customers
Railway wants to improve stake holder satisfaction. This was the problem scenario faced by
Railway department hired new staff and increased the number of customer service counters.
Passenger count and train services are steadily increasing, so this solution is not going to work
for a long term. Manual errors are also creeping up during calculations, leading to customer
They decided to come up with a computerized system that handles various day to day activities
at their office.
Computer Programs
Computer is a machine. It needs to be instructed how to perform a task, how to handle data,
Software – Collection of computer programs and data that tells computer what to do
In a computer based solution, business requirement of a user, ultimately get translated to lines of
code that instructs computer to work in such a way as to meet the requirement
sometimes forget the essence of the problem. It is essential for the individual to have a right
approach to the problem itself in order to figure out the best solution.
People who are really good at solving problems go about it systematically. They have a way of
placing the problem in context and do not jump to conclusions. They evaluate all alternatives.
This involves understanding the input and output, various alternatives to reach the output, listing
the assumptions
Checking for the correctness of algorithm by walking through the algorithm manually
Once the correctness of algorithm is checked, it can be translated to any programming language
Once the program is developed it needs to be tested against various test cases which checks if
In this module, the product or the output is given to the customer or end user for their purpose.
Related Videos
https://www.youtube.com/watch?v=lzW7S55P1Gc
Analytical skill is the ability to use good reasoning in analyzing a situation and also the ability to
solve the problem. Analytical skill can also be said as the ability to organise a mass of data and
draw proper correlations, and then interpreting these trends in terms that are meaningful to
others.
Suppose you have rain data for your town for the past thirty years, given to you at random, with
no comments. You can organise the data chronologically, then draw a graph to demonstrate the
data and then , by extending the graph along its closest fitting curve, you can make reasonable
predictions about the extent of rain next year, assuming that all other factors remain STEADY.
knowledge of how to do. If you have problem in hand and when you know the solution of the
problem then you have declarative knowledge. So ―What is‖ type of knowledge is called
exercised in the performance of some task. ―How to‖ type of knowledge is called Imperative
Knowledge.
Example:
Declarative Knowledge:
Imperative Knowledge:
Abstraction will modularize the logic for a specific functionality in a computer program. It will also
invoke the function. It is recommended that programmers use abstractions whenever suitable in
machine, particularly a computer. Programming languages can be used to create programs that
A good programming practice is related to writing efficient and readable code, a code which is
easily maintainable.
Related Videos
https://www.youtube.com/watch?v=jtuqZxClqKs
3. C# Introduction
programming languages like C#,VB,VC++ and J# can be used to develop applications. Here we
will learn how C# can be used in Visual Studio 2010 Express Edition to create console
applications. Express edition will give you all basics options to code, debug and run applications
using C#. This series features Visual C# 2010 Express Edition however the content will be valid
If you don’t already have some edition of Visual Studio installed you can use the link below to get
http://www.visualstudio.com/en-us/downloads#d-2010-express
Follow the instructions in the website to install Visual Studio Express Edition 2010 in your
machine. You may need to register it if you want to use it for more than 30 days. The C# express
supports Console/Windows applications. Web developer Express is required for ASP.Net Web
Applications.
After installing it you can go to All Programs and click on Microsoft Visual C# 2010 Express as
shown below.
In Visual Studio you can select File->New Project or New Project link below Microsoft Visual C#
In Visual Studio you can select File?New Project or New Project link below Microsoft Visual C#
If you want see all files in the solution Click on solution explorer as shown below.
Related Videos
https://www.youtube.com/watch?v=TgWrRSinbEY
4. C# Declaring and Assigning Variables
Objective
A variable is nothing but a name given to a storage area that our programs can manipulate.
Each variable in C# has a specific type, which determines the size and layout of the variable's
memory, the range of values that can be stored within that memory, and the set of operations
Value types
Reference types
Value Types
Value type variables can be assigned a value directly. They are derived from the
class System.ValueType.
The value types directly contain data. Some examples are int, char, float, which stores numbers,
alphabets, floating point numbers, respectively. When you declare an int type, the system
allocates memory to store the value.
To get the exact size of a type or a variable on a particular platform, you can use the sizeof
method. The expression sizeof(type) yields the storage size of the object or type in bytes.
namespace DataTypeApplication
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Size of int: {0}", sizeof(int));
Console.ReadLine();
}
}
}
When the above code is compiled and executed, it produces the following result:
Size of int: 4
Reference Types
The reference types do not contain the actual data stored in a variable, but they contain a
In other words, they refer to a memory location. More than one variable can point to the same
memory location, the reference types can refer to a memory location. If the data in the memory
location is changed by one of the variables, the other variable automatically reflects this change
Object Type
The Object Type is the ultimate base class for all data types in C# Common Type System (CTS).
Object is an alias for System.Object class. So object types can be assigned values of any other
Example:
object obj;
obj = 100;
obj = "Tom";
String Type
The String Type allows you to assign any string values to a variable. The string type is an alias
for the System.String class. It is derived from object type. The value for a string type can be
The user-defined reference types are: class, interface, or delegate, which shall be discussed
later.
<data_type> <variable_list>;
Here, data_type must be a valid C# data type including char, int, float, double, or any user-
defined data type, etc., and variable_list may consist of one or more identifier names separated
by commas.
int i, j, k;
char c, ch;
float f, salary;
double d;
Variable Initialization in C#
Variables are initialized (assigned a value) with an equal sign followed by a constant expression.
Variables can be initialized (assigned an initial value) in their declaration. The initializer consists
Try the following example which makes use of various types of variables:
namespace VariableDefinition
class Program
short a;
int b ;
double c;
/* actual initialization */
a = 10;
b = 20;
c = a + b;
Console.ReadLine();
}
}
When the above code is compiled and executed, it produces the following result:
a = 10, b = 20, c = 30
For example,
int num;
num = Convert.ToInt32(Console.ReadLIne());
The function Convert.ToInt32() converts the data entered by the user to int data type, because
The program below prompts the user to enter his name and he's given a welcome message with
his name:
namespace WelcomeProgram
class Program
string name;
name = Console.ReadLine();
}
4.4. Arrays
An array stores a fixed-size sequential collection of elements of the same type. An array is used
to store a collection of data, but it is often more useful to think of an array as a collection of
Instead of declaring individual variables, such as number0, number1, ..., and number99, you
declare one array variable such as numbers and use numbers[0], numbers[1], and ...,
index.
All arrays consist of contiguous memory locations. The lowest address corresponds to the first
Declaring Arrays
datatype[] arrayName;
where,
For example,
double[] balance;
Initializing an Array
Declaring an array does not initialize the array in the memory. When the array variable is
Array is a reference type, so you need to use the new keyword to create an instance of the array.
For example,
You can assign values to individual array elements, by using the index number, like:
double[] balance = new double[10];
balance[0] = 4500.0;
You can assign values to the array at the time of declaration, like:
In the preceding case, you may also omit the size of the array, like:
You can also copy an array variable into another target array variable. In that case, both the
When you create an array, C# compiler implicitly initializes each array element to a default value
depending on the array type. For example for an int array all elements would be initialized to 0.
Related Videos
https://www.youtube.com/watch?v=GuO11WN1AFU
https://www.youtube.com/watch?v=lc-6RrVfsno
5. C# -Conditional Operators
Objective
5.1. Introduction
There are many scenarios in our everyday life, where we need to take some decisions based on
some criteria or condition. Decision making is one of the major parts of .Net also.
Conditional logic is involved when different operations are to be performed based on whether a
decision is true or not. Conditional expressions consists of conditions that results in a boolean
value and performs actions based on the boolean result. There are three types of decision
1. if ...then – This statement is the most basic of all control flow statements. If then statement has
a certain condition expression. It executes a certain section of code only if that particular
condition is true. If the condition is false, control jumps to the end of the if then statement.
2. If ... then ... else – This statement provides a secondary path of execution when the condition
3. switch case – A switch statement allows a variable to be tested for equality against a list of
values. Each value is called a case, and the variable being input is checked for each case. This
statement helps to select one out of the many choices based on an integer or character value.
The conditions will accept only a value and not a range/comparison. The syntax is different from
if else statements. Here we are comparing the input value with different cases. We can set a
1. The variable used in a switch statement can only be a simple datatype like string, int, char etc.
2. You can have any number of case statements within a switch. Each case is followed by the
3. The value for a case must be the same data type as the variable in the switch and it must be a
constant or a literal.
4. When the variable is found equal to a case, the statements following that case will execute
until a break statement is reached. When a break statement is reached, the switch terminates,
and the flow of control jumps to the next line following the switch statement.
A switch statement can have an optional default case, which must appear at the end of the
switch. The default case can be used for performing a task when none of the cases is true.
We have already discussed ternary operator in previous course. This operator can be considered
Syntax
This means,
someCondition is executed.
Example
Console.WriteLine(comparisonResult);
Console.ReadKey();
Thus we can conclude the ternary operator can be considered as the short hand of if then else
statement.
The logical AND and logical OR operators both take two operands. Each operand is a boolean
The logical AND condition returns true if both operands are true, otherwise it returns false.
Syntax
(condition1 && condition2) // will return true if both conditions are true
Example:
int result = 0;
if ((num1 >= num2) && (num1 >= num3))
result = num1;
result = num2;
else
result = num3;
Console.WriteLine(result);
Console.ReadKey();
The logical OR condition returns false if both operands are false, otherwise it returns true.
Syntax
Examples:
result = "success";
Console.WriteLine(result);
Console.ReadKey();
Related Videos
https://www.youtube.com/watch?v=Eu9shw-rjFE
https://www.youtube.com/watch?v=byHHD8vXZoE
5.3. Practice Problems
1. Two numbers, num1 and num2 are input. Find whether num1 is greater, num2 is greater or
Our solution should have a method which input 2 numbers, compared the numbers and returns
Solution:
class Program
else
Console.ReadKey();
Input : 5, 3
13, 5
15,15
Output :
5 is greater than 3
13 is greater than 5
15 is equal to 15
Here we have used the conditional statements to compare the 2 numbers using relational
operators. Based on the result of the condition the result is constructed as a string statement with
2. Two numbers, num1 and num2 are input to the program. Based on the users choice one of the
Here we can use the switch case as decision maker. This can be implemented in if else also, but
we need to write more than 4 else cases. Instead a switch case can be used. Consider 1 - Add, 2
- Subtract, 3 - Multiply, 4 – Divide. Pass the 2 numbers and the operator to the program. Write a
switch case which will accept the operator number and decide which operation to do. Then
based on the decision made it will do the operation and assign the result. Break is used to break
one particular case after its execution. Break will bring the control at the end of switch case.
Default should be written so that, if the user enters a number other than 1,2,3 or 4 then it should
Solution:
class Program
Add\n2.Subtract\n3.Multiply\n4.Divide");
int result = 0;
switch (operate)
case 1:
Console.WriteLine("Addition");
break;
case 2:
Console.WriteLine("Subtraction");
break;
case 3:
Console.WriteLine("Multiplication");
break;
case 4:
Console.WriteLine("Division");
break;
default:
Console.WriteLine("Invalid operation");
result = 0;
break;
Console.ReadKey();
}
Input : 10,2,1
Output : 12
6.1. Loops
There may be a situation when we need to execute a block of code several number of times, and
1. while Loop
2. do...while Loop
3. for Loop
While loop:
In the example a while loop is written to print the numbers from 0 to 5. The variable x is initialized
with 0. Then in while loop, x is checked whether the value is less than 6. If the value of x is less
than 6, it enters the loop and prints the value of x. Then we increment the value of x by 1. Again it
comes to while condition and checks the condition. While condition will be true until x = 5. When
int x = 1;
while (x < 6)
x = x + 1;
Console.WriteLine("Exit testWhileLoop");
Console.ReadLine();
Output:
x is 1
x is 2
x is 3
x is 4
x is 5
Exit testwhileLoop
Note:
You can check the sample solution to know the implementation of code in Visual Studio
https://s3.amazonaws.com/cc-uploads/Sample1.zip
The do while construct consists of a block of code and a condition. First the code within the block
is executed, and then the condition is evaluated. If the condition is true the block is executed
do
statements
}
while (condition);
The example given for while is restructured in do while loop. The output is same.
int x = 1;
do
x = x + 1;
Console.WriteLine("Exit testDoWhileLoop");
Console.ReadLine();
Output:
x is 1
x is 2
x is 3
x is 4
x is 5
Exit testDoWhileLoop
Note:
You can check the sample solution to know the implementation of code in Visual Studio
https://s3.amazonaws.com/cc-uploads/Sample2.zip
See the same example with the value of x = 6, here we can see the difference of while and do
while loops. Here we can see the condition x< 6 is giving false as x = 6. But since its do while
loop, the statements get executed first. So we get xis 6 as output. Then it will check the condition
and exit the loop. If it was while loop the condition is checked first and loop will be exited.
int x = 6;
do
x = x + 1;
Console.WriteLine("Exit testDoWhileLoop");
Console.ReadLine();
Output:
x is 6
Exit testDoWhileLoop
Note:
You can check the sample solution to know the implementation of code in Visual Studio
https://s3.amazonaws.com/cc-uploads/Sample3.zip
For loop:
For loops are used when the number of iterations are known before entering the loop.
Counter based for loops: for loops that work on the basis of a counter value. The start and end
values of counter will be mentioned and loop will be executed as many times until the counter
reaches the end value. The counter will be incremented/decremented during each iteration.
class Program
{
for (int x = 1; x < 6; x++)
Console.WriteLine("Exit testForLoop");
Console.ReadLine();
Output:
x is 1
x is 2
x is 3
x is 4
x is 5
Exit testForLoop
Iterator based loops: This is commonly known as for-each loop. Some languages (E.g. Java,
PHP,C#) has a for each loop that iterates through a collection of items. This type of for loop does
foreach(string s in stringList)
Finite loops: Loops that terminate after a particular number of iterations based on either a
Infinite loops: A loop that do not terminate is known as infinite loop. Programmers should check
for conditions or errors that might result in an infinite loop which is not expected during the
execution of a program.
Some times infinite loops are used to make a program segment loop for ever until an exceptional
conditional such as an error arises. Such loops created intentionally will usually have a control
Eg. An event driven program should loop for ever handling events as they occur only stopping
be used inside any loop or a switch statement. Break statement terminates a for, while or do
while loop. The control is transferred to the first statement after the loop. The break keyword will
stop the execution of the innermost loop and start executing the next line of code after the block.
Syntax: break; (The syntax of a break is a single statement inside any loop)
You have already used break in switch case in conditional operators. We can see an example
where we use break in a loop. Here we have a for loop from 1 to 5. Also there is a break in the
flow when value of x = 3. After the break happens, the flow jumps out of for loop and prints Exit
testForLoop.
if(x==3){
break;
Console.WriteLine("Exit testForLoop");
Console.ReadLine();
Output:
x is 1
x is 2
Exit testForLoop
Continue Keyword
The continue keyword can be used in any of the loop control structures. Continue statement
skips the current iteration of a for, while or do while loop. It causes the loop to immediately jump
Syntax: continue; (The syntax of a continue is a single statement inside any loop)
We can see an example where we use continue in a loop. Here we have a for loop from 1 to 5.
Also there is a continue statement in the flow when value of x = 3. After the continue happens,
the flow stops the execution of that iteration and jumps to the next iteration of the loop. See the
output printed. Here when x = 3, the continue statement executes and skips rest of that iteration .
So the value of x when x = =3 is not printed. This is because the print statement is below the
continue. The continue statement will stop the current running iteration and starts the next
iteration.
if (x == 3)
continue;
}
Console.WriteLine("Exit testForLoop");
Console.ReadLine();
Output:
x is 1
x is 2
x is 4
x is 5
Exit testForLoop
Related Videos
https://www.youtube.com/watch?v=_Q1HvBgzows
https://www.youtube.com/watch?v=uErKDQpwjy0
The requirement is to find and print all the even numbers present below a given number.
The method should accept a number from the main. There should be a loop in the method, which
will start from 1 and increment by 1. Each number need to be checked whether its an even
number or not. If its an even number print the number else continue.
Solution:
int input;
input = Convert.ToInt32(Console.ReadLine());
for (int x = 1; x <= input; x++)
if ((x % 2) == 0)
Console.WriteLine(x);
Console.ReadLine();
Output:
Here the basic logic to find whether a number is even or odd is to divide the number by 2 and
see whether the remainder is 0. So to find the reminder we can use modulus operator %. Then
the reminder is checked whether its 0. If the reminder is 0, then that number is even. The loop
will continue till the max limit that is the input number.
requirements and better programming practices. In the beginning the programs will be small and
simple. Later the programs will become more and more complex based on the requirements. So
Unstructured Programming
Structured Programming
Procedural Programming
Modular Programming
Object Oriented Programming
Related Videos
https://www.youtube.com/watch?v=8T1Mion6ilw
Programs are set of instructions that act upon data that is received (input) and transforms it into
required information.
Expressions
Functions/Methods
A block of instructions that accept some data, carry out some operations and returns an output.
accepts data, processes it and returns an output. A function some times calls another function,
when it wants to make use of the functionality defined in the other function.
A program to calculate salary of an employee might look some what like this. A function to
calculate salary, calling another two functions that calculates HRA and DA. The values returned
In Structured programming the flow of program execution is based on the structure of the
program written. There is more dependency between the variables and the program like a chain.
Example : C language
We write programs that make up a software to solve a problem in real world. In real world
problem domains we do not find any functions that work on data. We find objects that are
objects that have state and behaviours, interacting with each other to achieve expected
functionalities.
In OO programming, the program basic entity is object. An object is any real world entity that has
a well-defined structure and behaviour. Eg: Pencil, Laptop, Mobile, Car, Book, and Human. Every
object has its own characteristics. Every object has 5 sets of characteristics.
7.3. Characteristics of an object
An object is a real world entity that has a well-defined structure and behaviour. It typically
State
Behaviour
Responsibility
Communication
Identity
State
State of an object is a set of properties that describes the object, which can take different values
Eg: Bob is an employee of tech smart, let us have a look into Bob’s properties as an employee:
Behaviour is how objects react to its state changes or any other operations performed on it
A bank account can perform these responsibilities, by making use of state values or other data
provided to it.
performed on it.
Responsibility
Doing responsibilities
Doing something itself, like creating an object/doing a calculation
Initiating action in other objects
Controlling and coordinating activities in other objects
Knowing responsibilities
Communication
Objects can communicate with each other, provided they know each other.
Objects can respond to the message send by another object, by performing an action, or
The nouns in the requirements specification would suggest the Objects in the problem domain.
The verbs from the requirements specification would suggest object behaviours.
Related Videos
https://www.youtube.com/watch?v=wE3t1NTlDlE
Introduction to Classes
Data-Types
Access Level Modifiers
Object State - Properties
Constructors
OOP Concepts – Encapsulation
Main Method
Sample Programs
an object does and what data it holds. After creating/ designing a Class, any number of similar
Thus, a class becomes the template for an object .An object becomes the instance of its class.
class ClassName
//code here
Class Customer
//code here;
The variables declared inside a Class are by default not accessible from other Classes, but to
The properties are special methods called as Accessors, which allows the data to be assigned
to/ accessed from the variable, through Read-only/ Write-only/ Read-Write permissions. The
properties enable a class to expose only the getting & setting of values, while hiding the
implementation of code.
The property contains 2 blocks, a get block, which is called Get accessor & set block, which
is called Set accessor. When the data has to be read using the property, the get accessor will
work & when the data has to be assigned to, the set accessor will work.
Thus the property restricts the access to the value. Property containing only the get block/
get accessor is a Read-Only Property. A property containing only the set block/ set accessor is
the Write-Only property, the Property containing both the Get & Set Accessor is a Read-Write
Property.
For e.g.; we will include the properties for Id & name in our customer class. The Id of the
customer is restricted from modification whereas the name can be given with Read-Write
class Customer
//Declaration of Variable
public int ID
//Declare Variable for name & use Property for Read & Write
Related Videos
https://www.youtube.com/watch?v=wk2SRUEvzzo
8.2. Classes - Constructors
Constructors help to pass the initial values to the variables declared in a class, during the
In C#, the variables inside a class are initialized with default values using a constructor. A
constructor should have the same name as that of the class. The initial values are passed as
parameters.
variable1 =parameter1;
variable2 = parameter2;
Since the constructor needs to be accessed from other Classes, the Access modifier will always
For e.g.; we can include a Constructor also in our class Customer, for initializing the Id and name
class Customer
//Declaration of Variable
public int ID
//Declare Variable for name & use Property for Read & Write
{
get { return _name; }
//variable = parameter
_id = id;
_name = name;
A class can have multiple constructors. Also, if a class does not contain a constructor, C# will
& Polymorphism.
Encapsulation: A group of related members treated as a single unit. A Class is a single unit
which keeps the variables, its related properties, constructors & other members inside it. Here
For e.g; our customer class holds some members. Using Encapsulation, all the members are
Related Videos
https://www.youtube.com/watch?v=jwlSagZcPOk
object is created using the ―new‖ keyword followed by the constructor. The constructor is invoked
as follows:
Here, ClassName(newValue) – is used to invoke the parameterized Constructor taking only one
value as the parameter and newValue represent the value to the variable initialised inside the
Constructor.
For e.g.; we will see how to create an object of our class customer, using a default Constructor:
Now, we will see how to create an object of our class customer using parametrized Constructor:
In C#, Console Application or a Windows Application needs to have starting point for the
program. The Main Method is defined as the entry point of a ―.exe‖ program, i.e. the program
One class should contain a Main Method. Since the execution starts from the Main Method
and it is invoked without creating an object of the Class, the Main method should be defined
Main method should also specify a return type. The return type can be either "void" type
which means returns nothing or ―int‖ datatype which means returns an integer value by the
Main Method can be defined with or without parameters. The Parameter are used to take the
Command line Arguments and the parameters are defined using string[] args.
//code here
or
//code here
Here we will see the Class program with the Main Method creating the objects of class customer
class Program
customer.Name="Joe";
Console.ReadKey();
class Customer
//Declaration of Variable
public int ID
{
get { return _id; }
//Declare Variable for name & use Property for Read & Write
//variable = parameter
_id = id;
_name = name;
public Customer()
//
Output:
0 :: Joe
100 :: Jack
Related Videos
https://www.youtube.com/watch?v=c29e4Zj7gtI
2. Variable Naming Convention - Variable names can be short, but need to be meaningful for
the purpose. All variable names can start with a lower case first letter and the next word in the
same start with capital letter. Variable name should be mnemonic — that is, designed to indicate
to the casual observer the intent of its use. One-character variable names should be avoided.
3. Property Naming Convention – Property names are given Similar as that of corresponding
4. Comments – In C#, single line Comments are given using // & multi-Line comments are given
console.
output should be
Name: Jacquil
Designation: Consultant
Place: LA
9O9 is a web shoppe which helps the user to purchase their item in a convenient manner. But to
order the items the user need to register first and then generate an online Bill after the internet
banking.
In this scenario, you might have identified some objects, what are they? What is the name of the
The objects that we can find here are User, Item, Bill. We need an object for the user for the
registration details.
To create an object for the user, we need a class with name User. We need variables for taking
the user details like First Name, Last Name, age and Location and Email ID. We will be passing
the values to the user object during the time of object creation, so we need a Constructor. Then
To start with the execution and work with the User class, we will include a Program class with
Main method.
Test the User registration by using 3 user objects. Print the name of the user using the objects
created.
Give the details of users like Haris Jack . Print the Last name, First name of the user as output.
I.e;
Jack, Haris
Solutions:
class User
//Variables
//Constructors
public User()
//
email)
_firstname = firstname;
_lastname = lastname;
_age = age;
_location = location;
_email = email;
//Properties
get
return _firstname;
set
_firstname = value;
}
}
get
return _lastname;
set
_lastname = value;
get
return _age;
set
_age = value;
get
return _location;
set
_location = value;
get
return _email;
set
_email = value;
class Program
{
static void Main(string[] args)
Console.Write(user1.LastName);
Console.Write(", ");
Console.WriteLine(user1.FirstName);
user2.FirstName = "Robert";
user2.LastName = "George";
user2.Age = 60;
user2.Location = "LA";
user2.EmailId = "roberto.georgie@live.in";
Console.Write(user2.LastName);
Console.Write(", ");
Console.WriteLine(user2.FirstName);
Console.Write(user1.LastName);
Console.Write(", ");
Console.WriteLine(user1.FirstName);
Console.ReadKey();
Output:
Jack, Haris
George, Robert
Joe
Wilson
50
London
hwilson@live.in
Wilson,Joe
a. public
b. protected
c. internal
d. private
The following five accessibility levels can be specified using the access modifiers:
Public:
Protected:
Access is limited to the containing class or types derived from the containing class.
Internal:
Protected Internal:
Access is limited to the current assembly or types derived from the containing class.
Private:
Types or Classes can only have internal or public accessibility. The default accessibility for these
types is internal.
Nested types/classes, which are members of other types/classes, can have declared
The following examples demonstrate how to specify access modifiers on a type and member:
// pedal implementation
To set the access level for a class or struct member, add the appropriate keyword to the member
// public class:
{
// protected method:can be accessed in the derived classes
assembly
of a private field. Properties can be used as if they are public data members, but they are actually
special methods called ―accessors‖. This enables data to be accessed easily and still helps
A property generally has a private data member accompanied by accessor functions and is
accessed syntactically as a field of a class. (Although properties can have different access levels,
ii. Definition of a public property using the property declaration syntax. This syntax associates the
private data member with a public property through get and set accessor functions.
get
{
return number;
set
number = value;
In this second example, the Time class stores a time period. Internally the class stores the time
in seconds, but a property named Hours enables a client to specify a time in hours. The
accessors for the Hours property perform the conversion between hours.
class Time
class Program
t.Hours = 24;
The term value is a keyword in the syntax for the property definition. The variable value is
The type of a property can be a primitive type, a collection of primitive types, a user-defined type,
Properties enable a class to expose a public way of getting and setting values, while hiding
A get property accessor is used to return the property value, and a set accessor is used to assign
The value keyword is used to define the value being assigned by the set accessor.
http://channel9.msdn.com/Series/C-Sharp-Fundamentals-Development-for-Absolute-
Beginners/Understanding-and-Creating-Classes-14
to be executed by calling the method and specifying any required method arguments. In C#,
every executed instruction is performed in the context of a method. The Main method is the entry
point for every C# application and when the program is started it is called by the CLR.
1. Access level
2. Return value type
3. Method name
4. Method parameters
5. Parentheses
6. Block of statements
Access Level
Access level of methods is controlled with access modifiers. They set the visibility of methods.
They determine who can call the method. In the following class method GetTopSpeed can be
accessed by any class since it is public. In this Example it is called within the Main method in the
same class.
class TestMotorcycle
{
Return Value
Methods may return a value to the caller. In case our method returns a value, we provide its data
type. If not, we use the void keyword to indicate that our method does not return values. Method
indicate that the method requires no parameters. The method block is surrounded with { }
characters. The block contains one or more statements that are executed, when the method is
invoked. In the following example, the method calculateArea() returns the variable Area as a
double value.
class ReturnTest
{
static double CalculateArea(int r)
{
double area = r * r * Math.PI;
return area;
}
Method Signature
A method signature is a unique identification of a method for the C# compiler. The signature
consists of a method name and the type and kind (value, reference, or output) of each of its
formal parameters. Method signature does not include the return type.
The following example shows a set of overloaded method declarations along with their
signatures.
Note that any ref and out parameter modifiers are part of the method signature. F(int) and F(ref
Method Access
Calling a method on an object is like accessing a field. After the object name, add a period, the
name of the method, and parentheses. Arguments are listed within the parentheses, and are
Static methods can be called using Class name then add a period, the name of the method and
In the following example, method CalculateArea is called in the Console's Main method in the
Program class. The method is accessed as test.CalculateArea(radius) where test is the object of
class ReturnTest
{
public double CalculateArea(int r)
{
double area = r * r * Math.PI;
return area;
}
}
class Program
{
static void Main()
{
ReturnTest test = new ReturnTest();
double result = test.CalculateArea(10);
Console.WriteLine("The area is {0:0.00}", result);
class ReturnTest
{
public static double CalculateArea(int r)
{
double area = r * r * Math.PI;
return area;
}
}
class Program
{
static void Main()
{
//Method is called using the Class name and dot operator
double result = ReturnTest.CalculateArea(10);
Console.WriteLine("The area is {0:0.00}", result);
Method Parameters
The method definition specifies the names and types of any parameters that are required. When
a program calls the method, it provides concrete values called arguments for each parameter.
In the following example, method CalculateBMI is called passing the arguments 123(weight) and
64(height).
class ParameterExample
{
static void Main(string[] args)
{
// The method can be called by passing arguments for the
parameters
int bmi = CalculateBMI(123, 64);
Console.WriteLine( bmi);
By default, when a value type is passed in a method, a copy is passed instead of the object itself.
Therefore, changes to the argument have no effect on the original copy in the calling method.
When an object of a reference type is passed in a method, a reference to the object is passed.
That is, the method receives not the object itself but an argument that indicates the memory
location of the object. If we change a member of the object by using this reference, the change is
In the following example, Method is called passing argument by ref and the changes done in the
When the method ValMethod is called where the argument is passed by value, there is no
class RefExample
{
static void Method(ref int i)
{
i = i + 44;
}
Console.WriteLine(val);
// Output: 45
}
}
Return Values
Methods can return a value to the caller. If the return type, the type listed before the method
name, is not void, the method can return the value by using the return keyword. A statement with
the return keyword followed by a value that matches the return type will return that value to the
method caller. The return keyword also stops the execution of the method. If the return type is
void, a return statement without a value is still useful to stop the execution of the method. Without
the return keyword, the method will stop executing when it reaches the end of the code block.
Methods with a non-void return type are required to use the return keyword to return a value.
In the following example method CalculateTax returns calculated Tax to the calling method. The
Method PrintTax does not have a return value. So when this method is called it prints the Tax
value to the Console and it exits when the end of the code block is reached.
class ReturnExample
{
static void Main(string[] args)
{
// The method can be called by passing arguments for the parameters
Tax oTax = new Tax();
double taxAmount = oTax.CalculateTax(1000000, 20);
oTax.PrintTax(taxAmount);
Console.ReadLine();
}
}
class Tax
{
public double CalculateTax(double Amount, double taxRate)
{
return (Amount * taxRate) / 100;
}
10.1. Array
Array is used to store multiple values of same type in a variable.
It is used to store values of value types and reference types
Size of the array should be decided at the time of creation itself.
Syntax:
Array store from index 0 till size-1 values. 'marks' array can hold values from marks[0] to
marks[9].
Output:
78
89
67
98
72
78
89
67
98
72
In case we have to store set of employee details then we can use array of type class. So in the
following sample, for each employee we have to store name, id and performance pay. So first we
create an employee array with the required attributes and a constructor is written to assign the
In our main program the employee array is created and values are stored and finally retrieved.
The size of employee array is 100. So it can store a maximum of 100 employees.
//In the following line and Array of type employee is created
//In the following line the object of type employee is created by passing the required values and
storing it in array.
Console.WriteLine("Id is "+empList[i].Id);
Sample:
class Employee
{
string name;
int id;
int performancePay;
}
//View the details of all the employees
for (int i = 0; i < 100; i++)
{
Console.WriteLine("Details of Employee no :"+ i+1);
Console.WriteLine("Id is "+empList[i].Id);
Console.WriteLine("Name is "+empList[i].Name);
Console.WriteLine("Performance Pay is
"+empList[i].PerformancePay);
}
Console.ReadKey();
}
}
listName.Add(object);
listName.Remove(object);
It is simple for Array list to store 3 values, display them and remove a value
list.Add(10);
list.Add(20);
list.Add(30);
Console.WriteLine(i);
list.Remove(20);
{
Console.WriteLine(i);
Console.ReadKey();
Output
20
30
30
A company has a set of departments. We will see how to add department to the arraylist, how to
change the existing details, how to delete a department and finally view the department's details
class Department
string name;
int id;
this.name = name;
this.id = id;
get
{
return (name);
set
name = value;
public int Id
get
return (id);
set
id = value;
class Program
{
ArrayList list = new ArrayList();
int choice;
string name;
int id;
do
Console.WriteLine("Menu");
Console.WriteLine("3.Delete a department");
Console.WriteLine("5.Exit");
choice = Convert.ToInt32(Console.ReadLine());
switch (choice)
case 1:
Console.WriteLine("Enter id,name");
id = Convert.ToInt32(Console.ReadLine());
name = Console.ReadLine();
list.Add(d);
break;
case 2:
id = Convert.ToInt32(Console.ReadLine());
name = Console.ReadLine();
id exists
if (dept.Id == id)
dept.Name = name;
break;
case 3:
id = Convert.ToInt32(Console.ReadLine());
if (dept.Id == id)
list.Remove(dept);
break;
break;
case 4:
//Loop through the department list and view all the department
details
}
break;
Console.ReadKey();
Output
Menu
3.Delete a department
5.Exit
Enter id,name
Admin
Menu
3.Delete a department
5.Exit
Enter your choice
Enter id,name
HR
Menu
3.Delete a department
5.Exit
Id is 1
Name is Admin
Id is 2
Name is HR
Menu
3.Delete a department
5.Exit
IS
Menu
3.Delete a department
5.Exit
Id is 1
Name is Admin
Id is 2
Name is IS
Menu
3.Delete a department
5.Exit
Menu
3.Delete a department
5.Exit
Id is 2
Name is IS
Menu
3.Delete a department
5.Exit
5
10.3. Generic list
List provides a dynamically sized set of objects of same type.
Generic collections are type safe since it allows only the specified types of input to be
added to the list
It is a generic collection.
We can perform add, edit, delete and display in generic list.
We have to add the namespace using System.Collections.Generic; to access generic list
Syntax:
eg.
listName.Add(object);
listName.Remove(object);
Sample program which will process a set of projects shown below. Using this sample add,
class Project
{
string name;
int id;
public Project(string name, int id)
{
this.name = name;
this.id = id;
}
public string Name
{
get
{
return (name);
}
set
{
name = value;
}
}
public int Id
{
get
{
return (id);
}
set
{
id = value;
}
}
}
class Program
{
static void Main(string[] args)
{
List<Project> list = new List<Project>();
int choice;
string name;
int id;
do
{
Console.WriteLine("Menu");
Console.WriteLine("1.Add new Project");
Console.WriteLine("2.Change project name");
Console.WriteLine("3.Delete a project");
Console.WriteLine("4.View all project");
Console.WriteLine("5.Exit");
Console.WriteLine("Enter your choice");
choice = Convert.ToInt32(Console.ReadLine());
switch (choice)
{
case 1:
Console.WriteLine("Enter id,name");
id = Convert.ToInt32(Console.ReadLine());
name = Console.ReadLine();
//Create a project object
Project d = new Project(name, id);
//Add the project object to the list
list.Add(d);
break;
case 2:
Console.WriteLine("Enter id of the
project");
id = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter the new name of the
project");
name = Console.ReadLine();
//Loop through the project array list to
find
//if the project with that id exists and delete the project
foreach (Project dept in list)
{
if (dept.Id == id)
{
//removes the department from the list
list.Remove(dept);
//break statement is mandatory since an item is removed from the
list
break;
}
}
break;
case 4:
//Loop through the project list and view all the project details
foreach (Project dept in list)
{
Console.WriteLine("Id is " + dept.Id);
Console.WriteLine("Name is " +
dept.Name);
}
break;
}
} while (choice != 5);
Console.ReadKey();
}
}
Output
Menu
3.Delete a project
5.Exit
Enter id,name
1
Admin
Menu
3.Delete a project
5.Exit
Enter id,name
HR
Menu
3.Delete a project
5.Exit
IS
Menu
5.Exit
Id is 1
Name is Admin
Id is 2
Name is IS
Menu
3.Delete a project
5.Exit
Menu
3.Delete a project
5.Exit
Id is 1
Name is Admin
Menu
3.Delete a project
5.Exit
10.5. Conclusion
Roadblocks:
Some topics in this series may take time to understand but make sure that you keep pushing
forward. Keep learning from different resources like Chanel 9 videos and
microsoftvirtualacademy. See the links below for learning material in Chanel 9 and
Microsoftvirtualacademy.
Chanel 9:
http://channel9.msdn.com/Series/C-Sharp-Fundamentals-Development-for-Absolute-Beginners
Microsoftvirtualacademy:
http://www.microsoftvirtualacademy.com/Content/ViewContent.aspx?et=3371&m=3369&ct=1817
3#?fbid=aKxmACFWEx8
Learning the topic from different authors will help you to understand topics better.
It is common to get stuck when you tried to solve problems in this series. It may be Installation &
configuration issues with Visual Studio or compilation errors when you build your program. There
are many good websites which will help you in internet to solve these problems. When you
search for the solution in internet you need to use the key phrases in error message you get.
Make sure that you are focusing on the actual error message.
There are many websites and forums which will help you to learn .Net and C# but it is always
good to refer websites from Microsoft. Visual Studio Developer Center is an official website which
will give you enough help to learn and understand Microsoft Technologies. You can find the link
below.
http://msdn.microsoft.com/en-us/vstudio/aa718325.aspx
What Next?
In this series we have given an introduction of C# language and you can learn more about C#
language by using Chanel 9 and MicrosoftVirtualAcademy videos. You can also learn about SQL
You can also try to learn asp.net to create webpages using Visual Studio.
1.1 Introduction
User Interface (UI) is a space where interactions between humans and machines occur. In
IT world, machines generally refer to computers. Hence it is also known as HCI (Human
Computer Interaction). In all IT applications you can find a form which will help the user to
interact with the system.
For a computer program, the user interface refers to the graphical, textual and auditory
information the program presents to the user. It also includes below user actions that are
invoked to control the program:
Keyboard keystrokes /Mouse movements
Voice commands
Touch
User Interface involves both hardware and software components that provide means of :
Input : Allows users to perform / trigger operations
Output : Allows system to indicate effects of user operations
The importance of good User Interface Design can be the difference between product
acceptance and rejection in the marketplace. A cumbersome, not easy to learn / use UI, in
an otherwise excellent product could result in the failure of that product. Good User Interface
can make a product easy to understand and use, which results in greater user acceptance.
Poor user interface is the reason why many software systems are never used.
Advantages:
Good for expert users
Generally support creation of user defined scripts or macros
Consumes low Bandwidth and hence suitable in a networked environment.
Disadvantages:
Learn-ability and Retention of commands is generally poor
Not suitable for non-expert users
Not very user friendly and hence error rates are high
Provision of appropriate error messages is difficult because of diversity of
possibilities
Advantages:
Simplifies data entry
Shortens learning time since the fields are predefined and need only be 'recognised'.
Guides the user via predefined rules
Disadvantages:
Consumes screen space
Menu Selection:
Menu indicates a set of options displayed on a UI. Selecting a menu item would execute the
functionality associated with that menu item
Direct Manipulation:
In this type of interaction objects of interest are represented as distinguishable objects in the
UI and are manipulated in a direct fashion.
What is HTML?
HTML is a language for describing web pages. HTML stands for Hyper Text Markup
Language. It is a markup language and uses markup tags to describe web pages. HTML
markup tags are usually called HTML tags. The purpose of a web browser (like Internet
Explorer or Firefox) is to read HTML documents and display them as web pages. The
browser does not display the HTML tags, but uses the tags to interpret the content of
the page.
Example:
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph</p>
</body>
</html>
If you copy and paste HTML tags above in a notepad to save it as sample.htm then it will
become an HTML document which can be opened in a web browser to display web content
as shown below.
The text between <html> and </html> describes the web page
The text between <body> and </body> is the visible page content
The text between <h1> and </h1> is displayed as a heading
The text between <p> and </p> is displayed as a paragraph
Paragraph:
To create a paragraph, surround the words that make up the paragraph with an opening <p>
tag and closing </p> tag.
Example:
<html>
<body>
<p> Many long articles have sub-headings so to help you follow the structure of what is
being written. There may even be sub-sub- headings (or lower-level headings). </p>
</body>
</html>
Result:
Try <strong> and <em> element and see how it will display text in the browser.
Other Elements in HTML:
<blockquote> - Used for longer quotes that take up an entire paragraph.
<q> - Used for shorter quotes that sit within a paragraph
<s> - Indicates something that is no longer accurate or relevant (but that should not be
deleted)
The <th> element is used just like the <td> element but its purpose is to represent the
heading for either a column or a row. Sometimes you may need the entries in a table to
stretch across more than one column. The colspan attribute can be used on a <td> element
and indicates how many columns that cell should run across.
Example:
<html>
<body>
<table>
<tr>
<th></th>
<th>10am</th>
<th>11am</th>
<th>12am</th>
<th>1pm</th>
</tr>
<tr>
<th>Monday</th>
<td colspan="2">Geography</td>
<td>JAVA</td>
<td>MS.Net</td>
</tr>
</body>
RESULT:
The rowspan attribute can be used on a <th> or <td> element to indicate how many rows a
cell should span down the table.
If you want to create a textbox for entering password use HTML code below.
<input type="password" name="password" maxlength="30" />
You can give maximum 30 characters in the textbox.
<textarea> - used to create a mutli-line text input.
Ex: <textarea name="Address" cols="20" rows="4">Enter your Address</textarea>
If you want to create a radio button for 3 options use the code below.
<input type="radio" name="Language" value="rock" checked="checked" /> C++
<input type="radio" name=" Language" value="pop" /> JAVA
<input type="radio" name=" Language" value="jazz" /> MS.Net
Note: name property is used to group set of radio buttons together
Example:
<html>
<body>
<form action=" www.google.com" method=”get”>
<p>
<input type="radio" name="Language" value="rock" checked="checked" /> C++
<input type="radio" name=" Language" value="pop" /> JAVA
<input type="radio" name=" Language" value="jazz" /> MS.Net
</p>
</form>
</body>
</html>
Result:
If you want to create a checkbox for 3 options use the code below.
<input type="checkbox" name="service" value="JAVA" checked="checked" /> JAVA
<input type="checkbox" name="service" value="C++" /> C++
<input type="checkbox" name="service" value="MS.Net" /> MS.Net
Create a dropdown list box using the code below.
<select name="devices">
<option value="JAVA"> JAVA </option>
<option value="C++"> C++</option>
<option value="MS.Net"> MS.Net</option>
</select>
A submit button is used to send information in a form to the server. The information will send
to the page specified in the form's action attribute.
Example:
<html>
<body>
<form name="input" action="https://www.google.co.in/" method="get">
Username: <input type="text" name="user">
<input type="submit" value="Submit">
</form>
</body>
</html>
Result:
2.1. Introduction
Introduction
CSS allows you to create rules that specify how the content of an element should appear.
For example, you can specify that the background of the page is blue, all paragraphs should
appear in gray using the verdana font. When you learn about CSS you should learn what is
CSS, How you can write CSS and finally how you can apply style in an HTML page using
CSS.
CSS Rules
A CSS rule contains two parts: a selector and a declaration.
Example: p{color:yellow;}
Here p is Selector and color:yellow; is declaration. This rule says that whenever you use <p>
in your HTML page the colour should be yellow.
CSS declarations sit inside curly brackets and each is made up of two parts: a property and
a value, separated by a colon. You can specify several properties in one declaration, each
separated by a semi-colon.
Example for a simple CSS in HTML
HTML File:
<html>
<head>
<title>Simple CSS</title>
<link href="css/sample.css" type="text/css" rel="stylesheet" />
</head>
<body>
<h1>Heading 1</h1>
<p>A <i>JAVA</i> resource is required</p>
<h2>Heading 2</h2>
</body>
</html>
Sample CSS:
body {
font-family: Arial, Verdana, sans-serif;}
h1, h2 {color: #ee3e80;}
p {
color: #665544;}
Here the <link> element can be used in an HTML document to tell the browser where to find
the CSS file used to style the page. It is an empty element (meaning it does not need a
closing tag), and it lives inside the <head> element. It should use three attributes:
href: path to the CSS file
type: specifies the type of document being linked to. The value should be text/css.
Rel: specifes the relationship between the HTML page and the file it is linked to. The value
should be stylesheet when linking to a CSS file.
3.1. Introduction
Introduction
JavaScript is a scripting language which was designed to add interactivity to HTML pages.
Javascript can directly embed into HTML pages. Usually we use javascript for client side
validations and client side operations.
Use of Javascript
JavaScript gives HTML designers a programming tool which can put dynamic text into an
HTML page. It can react to events and can read and write HTML elements. JavaScript can
be used to validate data, to detect the visitor's browser, to create cookies and interact with
and control frames.
To add a javascript into an HTML page use <script> tag
Example:
<html>
<body>
<script type="text/javascript">
document.write("Hello World!");
</script>
</body>
</html>
Basics:
Variable declaration:
In javascript we declare variables using var keyword. Ex: var variableName
Dot Notation:
Javascript uses dot notation to access properties and Methods on
objects:myObject.propertyName references propertyName on myObject,
and myObject.methodName() invokesmethodName on myObject.
Alert Function:
It is a common function used in javascript to display some text in browser.
It pops open a small window that displays the string you provided.
Ex: alert(―Hi‖);
Expressions, Statements and Operators:
Expression and Statements are building blocks of Javascript programs. An expression is any
section of code that resolves to a value. Since literal expressions evaluate to actual values,
JavaScript supports the same broad types of expressions as it does of variables: boolean,
number, string, and object.
Ex:
10 // Literal expression, resolves to 10
"Hello World" // Literal expression, resolves to the string "Hello World"
3+7 // Mathematical expression, resolves to 10
A statement is a collection of one or more expressions that performs a specific action.
Ex:
var x = 5, // variable assignment, a statement
y = 3,
z = x + y; // mathematical operation, also a statement
Operators perform operations on expressions. Operators perform their function. Javascript
operators fall into the following broad categories:
Arithmetic operators: Perform arithmetical operations on their operands, such as addition,
multiplication, etc.
Assignment operators: Modify variables, either by assigning their values or altering their
values according to specific rules.
Bitwise operators: Treat their operands as a set of 32 bits, and perform their operations in
that context.
Comparison operators: Compare their operands and return a logical value (true or false)
based on whether or not the comparison is true.
Logical operators: Perform logical operations on their operands and are often used to link
together multiple comparisons.
String operators: Perform operations on two strings, such as concatenation.
Miscellaneous operators: Operators that don’t fall into any of the above categories. This
category includes the conditional operator and operators such as the void operator and the
comma operator.
Variables:
A variable is a named storage location with an associated value.
In Javascript, variables are declared using the var keyword.
Ex: var myVar = 1;
It’s common practice to declare many variables at once. You can use the var keyword for
each variable, or you can use the var keyword once and separate the variable declarations
with commas. It’s also common practice to place each variable declaration on its own line.
Learn more about Javascript in http://www.w3schools.com/js/js_examples.asp
Check JavaScript Statements, Comments and Blocks, JavaScript Variables, JavaScript
Conditional If ... Else,JavaScript Popup Boxes, JavaScript Functions, JavaScript Loops and
JavaScript Events.
Apply styles using style sheet. Show success message if all the inputs are valid.
9. Create a website for submitting the final report of a student. The page should contain the
following things: First Name of student should be mandatory and should contain only
characters Middle Name is optional Last Name of student should be mandatory and should
contain only characters Mark1, Mark2 and Mark3 should be only positive numbers less than
100. There will be a text box with total marks and Also a button for calcultaing the total.
On clicking the calculate total it will add all the marks and then displays in place of total
marks, Also the submit button appears.Clicking on the submit button it will show proper
successful message.
10. Create web page for the requirement below.
General Instructions for these exercises:
There are total five pages to be created.
First one is home page with links to below three pages.
From below pages, on successful submit, navigate to welcome page.
Welcome page should have link to home page.
Place CSS and Javascript code in separate files.
Use effective styling as per your choice.
Use div tags and table for better layout.
Maintain consistency for all pages.
Add a doctor
Design a UI page / screen to capture the following details when registering a new
doctor in HMS.
First name, Middle name Last name, Registration No, Date of Birth , Gender(use
radio button), Email,
Specialization , Qualification, contact number, Address, Visiting Time, Visiting
Days(multiple selection
should be allowed), NoOfPatientsPerDay, DepartmentNo.
Indicate the mandatory fields on the page. All fields except middle name and address
are mandatory.
Use below mentioned sample values for drop down/check boxes:
Visiting Days – Mon,Tues,Wed,Thurs, Fri,Sat,Sun.
Visiting Time – Morning, Afternoon, Evening
Add a department
Design a UI page / screen to capture the following details when adding a new
department in HMS.
Department name, Department Description(use text area), No. Of Doctors, Number
of general rooms,
Number of ac rooms, Number of non ac rooms , Number of ICU , Cost of general
room, Cost of ac room,
Cost of non ac room, Cost of each ICU.
All fields are mandatory.
Add a patient
Design a UI page / screen to capture the following details when adding a new patient
in HMS.
First Name, Last Name , Date of birth, Gender(Use radio button), Father/Spouse
name, blood group(dropdown), Contact number, Visited earlier(check box)
All fields are mandatory except contact number.
Indicate mandatory fields on the page / screen.
Use below mentioned values in the dropdown :-
Blood Group – O+,O-,AB+,AB-,A+,A-,B+,B-,Others
_________________________________________________________________________