













































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
assignment of btech hnd first sem of programming
Typology: Assignments
1 / 85
This page cannot be seen from the preview
Don't miss anything!














































































Anish Devkota BTECH HND Introduction to Algorithm Algorithm is known as a rule or procedure followed for performing calculations and other specific tasks. Algorithm in programming can be defined as the sequence of instruction that 4 | P a g e
helps in solving various problems through step wisely.” An algorithm is the list of instructions and rules that a computer needs to do to complete a task” [ CITATION Thi \l 1033 ]. Algorithm also describes the exact steps to be followed by system to reach the main goal. Simply, algorithms command the computer system how to do the task and make it work according to the command. “A standard textbook definition would be – an algorithm is a well-defined step by step solution or a series of instructions to solve a problem.”([ CITATION Pri \l 1033 ] Algorithm consists steps like; Problem definition, data collection, data processing, logical approach, solution. Therefore, Programming algorithm is written in simple language and it is not a computer code. Algorithm is a simple human language which has a similarity to pseudocode. Characteristics of Algorithm
Algorithm; Step 1 = start Step 2 = enter two numbers Step 3 = check if a>b Step 4 = if not true display b is greater and if true display a is greater Step 5 = end Working: here, user will input two numbers, then condition of greater will be checked. After being checked, the system will give the number which is greater. Outline process of developing application This is a type of process/steps used by the software development offices or industries to make a software application. This also helps in understanding the main goal and cycle of software development. This process mainly defines the activities followed or to be followed for producing the suitable application. Simply, this can be known as the process in building successful application. The major steps in this process are: Planning and requirement analysis: Firstly, to build an application there must be good understanding of the system requirements. The main aim or goal must be well known and the planning must be done according to the possible and effective paths to be followed by the developers. During this planning, the requirements also must be fulfilled. Lastly, defining the requirement and planning for it is done in this process. Designing: After knowing the requirements and plan to implement for building successful application, the system design must be prepared. It clearly defines all the architectural modules of the system. This step/process can also be mentioned as sketching of the planned application. 7 | P a g e
Building or developing product Being able to know the requirements and plans to work for it, design was prepared. Now, the building process of the system will be started The system is developed after evaluating the produced design in a small programs called unit. Then after testing the final product is developed. Testing the product: When the application is built successfully, then there will be the final testing. Meet of requirement, user friendliness, understood designing etc. are checked. After being checked and the application will be deployed in market. Checking the functionality according to the client’s demand is done in this process. Deployment in market: The product will be deployed in a market for the clients/customers. This is also the first stage of the production to the market. The final product after testing and evaluating is deployed in the market. Maintenance After successful deployment, maintenance of the application must be done by the developers. Based on the client’s feedback the application must be improved and maintained up to date. This also helps in development of the application and popular to the market. Adding the new features and capabilities is also done in this process. Development environment Development environment is defined as the process or tools used for developing the source code or program involved in making application. Environment where tools and set of rules are coordinated for developers to provide convenient and systematic view of the development process is integrated development environment. Talking personally, our team have used Visual Studio 19 as my developing environment for successfully building the required application/system. Being easier to use and debug, visual studio was found to be more favorable for us as an application developer. Some more feature by using this development environment are:
Design forms of inventory system created in visual studio 19: 10 | P a g e Login Purchase Sales Purchase report Sales report Category Unit Product Customer Supplier Setup Transaction (^) Reports Dashboard
11 | P a g e
Data dictionary: Below is the data dictionary of our required application: User: S.N Column Name Data type Constraint Remarks 1 User Id Int Primary key Unique Id 2 User name Varchar(50) Not null Name of user to login 3 Email Varchar(50) Not null Email of user 4 Password Varchar(50) Not null Password of user 5 Phone Varchar(50) Not null Contact number of user Customer Supplier: S.N Column Name Data type Constraint Remarks 1 Customer/Supplier Id Int Primary key Unique Id 2 Customer/Supplier name Varchar(50) Not null Name of Customer/Supplier 3 Email Varchar(50) Not null Email of Customer/Supplier 4 Password Varchar(50) Not null Password 5 Phone Varchar(50) Not null Contact number Category: S.N Column Name Data type Constraint Remarks 1 Category Id Int Primary key Unique Id 2 Category name Varchar(50) Not null Name of category 3 Category type Varchar(50) Not null Type of category 4 Remarks Varchar(50) Not null Remarks for category Unit: S.N Column Name Data type Constraint Remarks 1 Unit Id Int Primary key Unique Id 13 | P a g e
2 Unit name Varchar(50) Not null Name of Unit 3 Alias Varchar(50) Not null Also known as name Product: S.N Column Name Data type Constraint Remarks 1 Product Id Int Primary key Unique Id 2 Product name Varchar(50) Not null Name of user to login 3 Rate money Not null Email of user 4 Quantity Int Not null Password of user 5 Unit Id Int Foreign key From unit 6 Category Id Int Foreign key From category 7 Customer Supplier Id Int Foreign key From Customer Supplier Transaction master: S.N Column Name Data type Constraint Remarks 1 Transaction Id Int Primary key Unique Id 2 Customer Supplier Id Int Foreign key From customer Supplier 3 Transaction date date Not null Date of transaction 4 Type Nvarchar(10) Not null Type 5 Grand Total Decimal(18,0) Not null Total transaction amount 6 Tax Decimal(18,0) Not null Tax in any product 7 Discount Decimal(18,0) Not null Discount in product Transaction detail: S.N Column Name Data type Constraint Remarks 1 Transaction detail Id Int Primary key Unique Id 2 Transaction Id Int Foreign key From transaction master 3 Product Varchar(50) Not null Name of product 4 Quantity Int Not null Quantity of product 5 Rate Money Not null Rate from product 6 Total Decimal(18,0) Not null Total amount of product The above table shows the type of data used in our system for different attributes of a different tables. Algorithm and flowchart of application Below is the algorithm and flowchart modules of our designed application.
preprocessed, compiler will compile the code into object codes (obj. o) then the linker links the compiled object codes with other library codes and make the code in executable form. Then the loader will load the final executable code into the machine and lastly the output of source code is displayed. Source code: “Source code is the list of human readable instructions that a programmer writes often in a word processing program when he/she is developing a program.”[ CITATION Dav19 \l 1033 ]. Source code must be converted into machine level code because this is only readable and understood by human not machine. It is processed through compiler to turn into machine code that is known to computer. Preprocessor The preprocessor directives give instruction to the compiler to preprocess the information before actual compilation starts. All preprocessor directives begin with #, and only white- space characters may appear before a preprocessor directive on a line. Preprocessor directives are not statements, so they do not end with a semicolon (;)” [ CITATION tut \l 1033 ]. Assembler/Compiler The assembler is a process of documenting or converting all the source code into machine level code. Here, the source code is converted into the binary form which is understood to the computer and produce an executable code. Assembler is also referred as a compiler of assembly language which provides services or interpreter. Linker The linker links the compiled object codes with other library codes and make the code in executable form. This is also called as final stage of compilation process. It makes the input from user as one and produce to the loading process. Loader Loader is considered as the final stage of program. Here, the code is executed into the main memory. This is the responsible factor for loading the executable files into the system’s memory. Loader also helps in validate program for memory requirements, permission, initializing the registers etc. Memory This is the final step of execution of any program in computer. Here the program conducted in a machine is saved. The process from source code and loader including its product is saved in memory. In a computer while executing a program, RAM is responsible for the time of producing the final product and ROM is responsible for keeping or storing the final product. Implementation of algorithm Hereby after knowing the algorithm of any sort of program we can create a source code for it to apply in program. Algorithm also helps in the code writing and designing process. Understanding of the process of code is also understood by flowchart and algorithm. Below is the implementation of a program with algorithm and flowchart and program written following C language. 19 | P a g e
Question: Find the simple interest from the number. Algorithm; Step 1= start Step 2= get the value of principle, time and rate Step 3= calculate with the process (PTR)/ Step 4= display the value of interest Step 5= end Flowchart; Code written in Dev C++ following the C language method: 20 | P a g e