VISUAL PROGRAMMING SUBMITTED TO SOHAIL UR REHMAN SUBMITTED

VISUAL PROGRAMMING SUBMITTED TO : SOHAIL UR REHMAN SUBMITTED BY : ABDUL BASIT PROGRAM : BCS SEMESTER : 6 TH ID NUMBER : 12812

Q 1 : WHAT DO YOU KNOW ABOUT. NET FRAMEWORK? EXPLAIN IN DETAIL. • The. Net framework is a software development platform developed by Microsoft. The framework was meant to create applications, which would run on the Windows Platform. The first version of the. Net framework was released in the year 2002. • The version was called. Net framework 1. 0. The. Net framework has come a long way since then, and the current version is 4. 7. 1. • The. Net framework can be used to create both - Form-based and Webbased applications. Web servicescan also be developed using the. Net framework. • The framework also supports various programming languages such as Visual Basic and C#. So developers can choose and select the language to develop the required application. In this chapter, you will learn some basics of the. Net framework.

IN THIS TUTORIAL, YOU WILL LEARN. NET FRAMEWORK ARCHITECTURE. NET COMPONENTS. NET FRAMEWORK DESIGN PRINCIPLE • Net Framework Architecture • The basic architecture of the. Net framework is as shown below. • net framework architecture diagram

. NET COMPONENTS • The architecture of the. Net framework is based on the following key components; • 1. Common Language Runtime • The "Common Language Infrastructure" or CLI is a platform on which the. Net programs are executed. • The CLI has the following key features: • Exception Handling - Exceptions are errors which occur when the application is executed. Examples of exceptions are:

• If an application tries to open a file on the local machine, but the file is not present. • If the application tries to fetch some records from a database, but the connection to the database is not valid. • Garbage Collection - Garbage collection is the process of removing unwanted resources when they are no longer required. Examples of garbage collection are • A File handle which is no longer required. If the application has finished all operations on a file, then the file handle may no longer be required. • The database connection is no longer required. If the application has finished all operations on a database, then the database connection may no longer be required. • Working with Various programming languages –

• As noted in an earlier section, a developer can develop an application in a variety of. Net programming languages. • Language - The first level is the programming language itself, the most common ones are VB. Net and C#. • Compiler – There is a compiler which will be separate for each programming language. So underlying the VB. Net language, there will be a separate VB. Net compiler. Similarly, for C#, you will have another compiler. • Common Language Interpreter – This is the final layer in. Net which would be used to run a. net program developed in any programming language. So the subsequent compiler will send the program to the CLI layer to run the. Net application.


2. CLASS LIBRARY • The. NET Framework includes a set of standard class libraries. A class library is a collection of methods and functions that can be used for the core purpose • A namespace is a logical separation of methods. We will learn these namespaces more in detail in the subsequent chapters. • 3. Languages • The types of applications that can be built in the. Net framework is classified broadly into the following categories. • Win. Forms – This is used for developing Forms-based applications, which would run on an end user machine. Notepad is an example of a client-based application. • ASP. Net – This is used for developing web-based applications, which are made to run on any browser such as Internet Explorer, Chrome or Firefox.

Q 2 : WHAT DO YOU KNOW ABOUT SWITCH STATEMENT? EXPLAIN WITH THE HELP OF PROGRAMMING EXAMPLE. • Switch statement tests the value of a variable and compares it with multiple cases. Once the case match is found, a block of statements associated with that particular case is executed. • Each case in a block of a switch has a different name/number which is referred to as an identifier. The value provided by the user is compared with all the cases inside the switch block until the match is found. • If a case match is NOT found, then the default statement is executed, and the control goes out of the switch block.

FLOW CHART DIAGRAM OF SWITCH CASE • Following diagram illustrates how a case is selected in switch case:


• In the given program we have initialized a variable num with value 8. • A switch construct is used to compare the value stored in variable num and execute the block of statements associated with the matched case. • In this program, since the value stored in variable num is eight, a switch will execute the case whose case-label is 8. After executing the case, the control will fall out of the switch and program will be terminated with the successful result by printing the value on the output screen.

Q 3: DISPLAYS HIS GRADE ACCORDING TO THE FOLLOWING CRITERIA: • Get started • how to build a program using if statement in C++ to grade student results • Aboderin Micheal • Oct 3, 2017 · 2 min read • This Article is about how you can create a simple program using c++ if and if else, we want the program to grade the results of student according to their score. Each students are required to input their scores into the program and then program gives him a grade according to the score inputted. how the result will be graded by the program is shown bellow • Marks Grade • 90 — — -100 A+ • 80 — — -89 A • 70 — — -79 B • 60 — — -69 C • 50 — — -59 D • 00 — — -49 F

• # include<iostream> • using namespace std; • int main() • { int marks; • cout<<” — -Program To Find Grade — -”<<endl; • cout<<”n. Enter Marks: “; • cin>>marks; • if(marks>=90 && marks<=100) cout<<”Your Grade is A. ”; • else if(marks>=80 && marks<90) cout<<”Your Grade is A. ”; • else if(marks>=70 && marks<80) cout<<”Your Grade is B. ”; • else if(marks>=60 && marks<70) cout<<”Your Grade is C. ”; • else if(marks>=50 && marks<60) cout<<”Your Grade is D. ”; • else if(marks>=0 && marks<50) cout<<”Your Grade is F. ”; • else cout<<”Invalid Marks. ”; return 0; } • this is how to we create a simple grading software using if statement in c++
- Slides: 14