Download Programming bsc it hons unit 4 and more Assignments Computer Programming in PDF only on Docsity!
INTERNATIONAL SCHOOL OF MANAGEMENT AND TECHNOLOGY
GAIRIGAUN, TINKUNE, KATHMANDU
NEPAL
SUBMITTED BY:
FULL NAME: SACHIN RAJ KHADKA
COURSE: PROGRAMMING
SEMESTER: FIRST
SECTION: “D”
YEAR OF ENROLLMENT: 2019
SUBMITTED TO:
Shiva Poudel Sachin Raj Khadka (HND / First Semester)
Contents
Part 1.......................................................................................................................................................................... Report:........................................................................................................................................................................ Introduction:............................................................................................................................................................... Feature of Algorithm:................................................................................................................................................. Advantage of Algorithm:............................................................................................................................................ Disadvantage of Algorithm:....................................................................................................................................... Flow Chart:................................................................................................................................................................. Outline process of designing an application:........................................................................................................... 1 Development Environment:..................................................................................................................................... 1 XAMPP:............................................................................................................................................................... 1 MySQL:................................................................................................................................................................ 1 Visual Studio:....................................................................................................................................................... 1 Programming Language:.......................................................................................................................................... 1 Types of Programming Languages........................................................................................................................... 1 Low Level Languages........................................................................................................................................... 1
- Machine Language....................................................................................................................................... 1
- Assembly Language..................................................................................................................................... 1 3.High-Level Languages.................................................................................................................................. 1 C#............................................................................................................................................................................. 1 Why C# is used?....................................................................................................................................................... 1 Platform Environment:............................................................................................................................................. 1 Design and architecture of environment:................................................................................................................. 1 Architecture design of application Inventory Management System..................................................................... 1 Design layout of the application:.............................................................................................................................. 1 Data Dictionary:....................................................................................................................................................... 2 Algorithm and flowchart for the application:........................................................................................................... 2 Sachin Raj Khadka (HND / First Semester)
- Execution of Code:...................................................................................................................................................
- Editor:...................................................................................................................................................................
- Preprocessor:.........................................................................................................................................................
- Compiler:..............................................................................................................................................................
- Assembler:............................................................................................................................................................
- Linker:..................................................................................................................................................................
- Loader:..................................................................................................................................................................
- Memory:...............................................................................................................................................................
- C language................................................................................................................................................................
- Examples of C:.....................................................................................................................................................
- Net program and console example:..........................................................................................................................
- Examples:.............................................................................................................................................................
- Evaluation between algorithm and code variant:.....................................................................................................
- Conclusion:...............................................................................................................................................................
- Part 2........................................................................................................................................................................
- Report:......................................................................................................................................................................
- Introduction:.............................................................................................................................................................
- Procedural arranged programming (pop): -..............................................................................................................
- Control structure and conditional structure:.............................................................................................................
- Loop:.....................................................................................................................................................................
- For loop............................................................................................................................................................
- While loop:.......................................................................................................................................................
- Do while loop...................................................................................................................................................
- Nested Loop.....................................................................................................................................................
- Conditional Statement:.............................................................................................................................................
- If statement:..............................................................................................................................................................
- If else statement:.......................................................................................................................................................
- If- else if statement...................................................................................................................................................
- Switch statement:.....................................................................................................................................................
- Structure...................................................................................................................................................................
- Union........................................................................................................................................................................
- File Handling............................................................................................................................................................
- Functions for file handling....................................................................................................................................
- Pointer:.....................................................................................................................................................................
- Array:.......................................................................................................................................................................
- Function....................................................................................................................................................................
- Function Aspects..................................................................................................................................................
- Object-oriented programming (OOP):.....................................................................................................................
- Features of OOP...................................................................................................................................................
- Class and Objects:............................................................................................................................................
- Data encapsulation:..........................................................................................................................................
- Inheritance........................................................................................................................................................
- Event driven programming:......................................................................................................................................
- Relationship between procedural, object-oriented and event-driven programming:...............................................
- Integrated Development Environment:.................................................................................................................... - Common features of integrated development environments............................................................................ - Benefits of using IDEs.....................................................................................................................................
- Tools available in IDE..............................................................................................................................................
- Code editor............................................................................................................................................................
- Steps for the connectivity between C#.NET and database:......................................................................................
- Evaluating source code of application...................................................................................................................... - Pass by Value................................................................................................................................................... - Pass by Reference.............................................................................................................................................
- Conclusion:...............................................................................................................................................................
- Part 3........................................................................................................................................................................
- Development document:...........................................................................................................................................
- Design view and code view of the application:....................................................................................................
- Conclusion:...............................................................................................................................................................
- Report (IDE evaluation):..........................................................................................................................................
- Contents:...............................................................................................................................................................
- Introduction:.............................................................................................................................................................
- IDE for management of development process of the program................................................................................
- Tools available in IDE..............................................................................................................................................
- Code editor............................................................................................................................................................
- Visual studio benefits.............................................................................................................................................
- Constraints of visual studio....................................................................................................................................
- Conclusion:.............................................................................................................................................................
- Report (Debugging Evaluation):............................................................................................................................
- Contents:.............................................................................................................................................................
- Introduction:...........................................................................................................................................................
- Process of debugging..............................................................................................................................................
- Debugging facilities in IDE....................................................................................................................................
- Debugging an Application..................................................................................................................................
- Breakpoints and Data Tips..................................................................................................................................
- Runtime Errors...................................................................................................................................................
- Edit and Continue...............................................................................................................................................
- Report (Evaluation report) including fully commented source code:....................................................................
- Contents:.............................................................................................................................................................
- Introduction:...........................................................................................................................................................
- Conclusion:.............................................................................................................................................................
- Future enhancement of the application inventory management system:...............................................................
Report: Introduction: This report illustrates algorithm and its working mechanism including features, advantages, etc. As we know algorithm is comprehensible computational operation that takes some value, or set of values, as input and produces some value, or set of values, as output or it may also can defined as a sequence of computational steps that transform that input into output. It is generally used to operate data in different action such as to include a new data item, to find a particular item or sorting some item. With natural language, pseudo code and flowchart, algorithm can be presented and it can be implemented in more than one programming language. Feature of Algorithm: First thing not all procedures can be called as an algorithm. To be an algorithm it should have 0 or more well defined inputs as well as it must have 1 or more well defined outputs, and have to meet the desired output. It should be clear and must lead to only one meaning of their input and output as well as algorithm must have step -by -step direction. An algorithm must terminate in countable number of steps and each steps of algorithm must be easily convertible into program statement. Advantage of Algorithm: It provides core solution to given problem, it’s easily to identification and removal of logical error in program because in algorithm each step has their own logical sequence, using algorithm we can facilitates algorithm analysis to find out the more efficient solution to a given problem. Disadvantage of Algorithm: as we know everything has disadvantage so algorithm has too some of them are in large algorithm, the flow of program controls become difficult to track, and lack visual representation of programming constructs like flow chart thus, understanding the logic become relatively difficult. Flow Chart: Flow chart is the graphical diagram through which we can represent our algorithm, Flow chart helps to make our logic clear as well as make testing and debugging easy. To representing sequence of steps in an algorithm, flow chart is best way. Basic example of algorithm with flow chart. Example 1: Calculate the Interest of a Bank Deposit Algorithm: Sachin Raj Khadka (HND / First Semester)
Step 1: Read amount, Step 2: Read years, Step 3: Read rate, Step 4: Calculate the interest with formula "Interest=AmountYearsRate/ Step 5: Print interest, Flowchart: Example 2: Determine Whether a Temperature is Below or Above the Freezing Point Algorithm: Step 1: Input temperature, Step 2: If it is less than 32, then print "below freezing point", otherwise print "above freezing point" Flowchart: Sachin Raj Khadka (HND / First Semester)
Outline process of designing an application: It’s pretty evident that technology is accelerating at a rapid pace and humans are becoming further dependent on it for every purpose. And with every new day, software development is becoming more and more crucial since the demand for software is fast rising from every corner imaginable. In fact, almost every machine that we use can be a by-product of some software empowering it. And going by the recent trends in the market, software development in India is quite a bustling scene, what with India providing a huge chunk of software intelligence that’s required to make this process successful. Sachin Raj Khadka (HND / First Semester)
The process of software development services in India goes through a series of stages in step wise fashion that almost every developing company follows. Known as the ‘software development life cycle,’ these six steps include planning, analysis, design, development & implementation, testing & deployment and maintenance. Let’s study each of these steps to know how the perfect software is developed.
1. Planning: Without the perfect plan, calculating the strengths and weaknesses of the project, development of software is meaningless. Planning kicks off a project flawlessly and affects its progress positively. 2. Analysis: This step is about analyzing the performance of the software at various stages and making notes on additional requirements. Analysis is very important to proceed further to the next step. 3. Design : Once the analysis is complete, the step of designing takes over, which is basically building the architecture of the project. This step helps remove possible flaws by setting.
- Development & Implementation : The actual task of developing the software starts here with data recording going on in the background. Once the software is developed, the stage of implementation comes in where the product goes through a pilot study to see if it’s functioning properly. 5. Testing: The testing stage assesses the software for errors and documents bugs if there are any. 6. Maintenance: Once the software passes through all the stages without any issues, it is to undergo a maintenance process wherein it will be maintained and upgraded from time to time to adapt to changes. Almost every software development Indian company follows all the six steps, leading to the reputation that the country enjoys in the software market today. Development Environment: It is a software with useful functionalities for developers and setup for productivity tools to help with software development which has graphical user interface workbench with menu and toolbar from which developers can write, build and teste program. Using a development environment increases programmer productivity by offering all needed functionalities in an integrated user interface. These functionalities include source code editor (with syntax color coding, automatic formatting, code completion and automatically highlighting the syntax errors), file management, debugger, data structure browsers like class browser (to show the Sachin Raj Khadka (HND / First Semester)
Visual Studio includes a code editor supporting IntelliSense (the code completion component) as well as code refactoring. The integrated debugger works both as a source-level debugger and a machine-level debugger. Other built-in tools include a code profiler, forms designer for building GUI applications, web designer, class designer, and database schema designer. It accepts plug-ins that enhance the functionality at almost every level-including adding support for source control systems (like Subversion and Git) and adding new toolsets like editors and visual designers for domain-specific languages or toolsets for other aspects of the software development lifecycle (like the Team Foundation Server client: Team Explorer). Programming Language: A programming language is a formal language, which comprises a set of instructions that produce various kinds of output. Programming languages are used in computer programming to implement algorithms. Types of Programming Languages A programming language is a set of commands, instructions, and other syntax use to create a software program. Languages that programmers use to write code are called “high-level languages.” This code can be compiled into a “low-level language,” which is recognized directly by the computer hardware. Low Level Languages Low level computer languages are machine codes or close to it. Computer cannot understand instructions given in high level languages or in English. It can only understand and execute instructions given in the form of machine language i.e. language of 0 and 1. There are two types of low-level languages:
1. Machine Language The set of instructions executed directly by a computer’s central processing unit (CPU) is called Machine code. In machine language each and every instruction performs specific operation. The machine code is in the form a numerical code (i.e. not assembly code) and is the lowest-level representation of a compiled and/or assembled computer program .Machine language is also called as a primitive and hardware-dependent programming language. Writing programs directly in numerical machine code is tedious task. Sachin Raj Khadka (HND / First Semester)
2. Assembly Language A personal computer has a microprocessor of its own that manages the computer’s arithmetical, logical and control activities. All these operations are managed through a set of instructions by each family of processors. These operations are handled by getting input from keyboard and displaying information on screen and performing various other jobs. These set of instructions are called machine language instructions. Machine language instructions are in the form of strings of 1’s and 0’s. Machine language is quite obscure and complex for using in software development. For this very reason low-level assembly language is designed for representation of all the instructions in a symbolic code yet in a more understandable form for a specific family of processors. 3.High-Level Languages Writing programs was made easier with time. Earlier languages that were developed, during the development of computers required knowledge of the internal workings of the computer, hence attempts were made to ease the programming where the knowledge on the internal workings of the computer was not required. High-level programming languages allowed the specification of writing a program closer to those used by human beings. With the advent of high-level languages, programming became far easier, less error-prone and also removed the programmer from having to know the details of the internal structure of a particular computer. Fortran II was one of the first high level language introduced in about 1958. C# C# is a cutting edge, broadly useful, object-situated programming language created by Microsoft and affirmed by European Computer Manufacturers Association (ECMA) and International Standards Organization (ISO). C# was created by Anders Hejlsberg and his group amid the improvement of .Net Framework. C# is intended for Common Language Infrastructure (CLI), which comprises of the executable code and runtime condition that permits utilization of different abnormal state dialects on various PC stages and designs Anders Hejlsberg is known as the founder of C# language. It is based on C++ and Java, but it has many additional extensions used to perform component- oriented programming approach. C# has evolved much since their first release in the year 2002. It was introduced with .NET Framework 1.0 and the current version of C# is 5.0. Sachin Raj Khadka (HND / First Semester)
desktop based because it is beginner friendly and consumes less power with higher performance. Especially we use Windows Form Application which is original platform for managed Windows applications with a lightweight UI model and access to the full .NET Framework. Design and architecture of environment: In Designing segment, we use simple windows form application in which we use different kind of tools from toolbox i.e. in visual studio IDE. This part can also be known as UI part where we design our application using various tools and coding Below the page I have inserted the picture of the architecture of the environment we use. It consists of various mapping such as database connection, UI designing as we mentioned above, database designing, login form, etc. Architecture design of application Inventory Management System. Sachin Raj Khadka (HND / First Semester)
LOG IN
Dashboard/Main form Entry Reports Transistor s staffs customers products suppliers sales purchases Stock report purchase report sales report customer diary Supplier diary logout
Design layout of the application: The desktop application inventory management system was designed or developed in the software called visual studio. Login page: Dashboard: Staffs: Customer: Products: Suppliers: Sachin Raj Khadka (HND / First Semester)
Suppliers diary: Customer diary: Sachin Raj Khadka (HND / First Semester)
Purchase report: Stock report: Data Dictionary: A data dictionary is a file or sets of files which contains data in the table providing all the information about the database. The data dictionary is used by SQL Server to execute queries and it is automatically updated when the objects are added, removed, or changed in the database. Data dictionary contains records about the objects and their relationships. The following data dictionary is given of desktop application for Inventory Management System. Uses of a Data Dictionary:
- It is used to give clear and structured information about the database.
- It is used to provide the starting point for developing reports and screens.
- It is used to control the access to different objects in the database by the means of its views.
- It is used to develop the logic for data flow diagram process. To make an application we must first prepare the ER diagram which includes the entities and the attributes of the data along with the relation of each one of them with the other. Then we must prepare the schema diagram. It defines all the constraints that should be applied for data. It is the most important diagram for making the application. I have made the schema diagram of the Beacons Management which contacts 7 tables while its attributes and relationship between tables. Then comes Sachin Raj Khadka (HND / First Semester)