Visvesvaraya Technological University a Project Report
Total Page:16
File Type:pdf, Size:1020Kb
VISVESVARAYA TECHNOLOGICAL UNIVERSITY “Jnana Sangama”, Belagavi – 590 018 A PROJECT REPORT ON “Environment Setup for various Programming Languages” Submitted in partial fulfillment for the award of the degree of BACHELOR OF ENGINEERING IN COMPUTER SCIENCE AND ENGINEERING BY RAHUL.S (1NH12CS741) ANURAG (1NH12CS708) Under the guidance of Ms. T.KARTHIKAYINI (Assistant Professor, Dept. of CSE, NHCE) DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING NEW HORIZON COLLEGE OF ENGINEERING (ISO-9001:2000 certified, Accredited by NAAC ‘A’ , Permanently affiliated to VTU) Outer Ring Road,Panathur Post, Near Marathalli, Bangalore – 560103 NEW HORIZON COLLEGE OF ENGINEERING (ISO-9001:2000 certified, Accredited by NAAC ‘A’ Permanently affiliated to VTU) Outer Ring Road, Panathur Post, Near Marathalli, Bangalore-560 103 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING CERTIFICATE Certified that the project work entitled “ENVIRONMENT SETUP FOR VARIOUS PROGRAMMING LANGAUGES” carried out by RAHUL.S (1NH12CS741) & ANURAG (1NH12CS708) bonafide students of NEW HORIZON COLLEGE OF ENGINEERING in partial fulfillment for the award of Bachelor Of Engineering/Bachelor Of Technology in Computer Science and Engineering of the Visvesvaraya Technological University, Belgaum during the year 2015-2016. It is certified that all corrections/suggestions indicated for Internal Assessment have been incorporated in the report deposited in the department library. The project report has been approved as it satisfies the academic requirements in respect of Project work prescribed for the said Degree. Name & Signature of Guide Name & Signature of HOD Signature of Principal (Ms.T.Karthikayini ) (Dr. Prashanth C.S.R.) (Dr. Manjunatha) External Viva Name of Examiner Signature with date 1. 2. ACKNOWLEDGEMENT The satisfaction and euphoria that accompany the successful completion of any task would be, but impossible without the mention of the people who made it possible, whose constant guidance and encouragement crowned our efforts with success. We thank the management, Dr. Mohan Manghnani, Chairman of NEW HORIZON EDUCTIONAL INSTITUTIONS for providing necessary infrastructure and creating good environment. We also record here the constant encouragement and facilities extended to us by Dr. Manjunatha, Principal, NHCE and Dr. Prashanth.C.S.R, Dean Academics, Head of the Department of Computer Science and Engineering. We extend our sincere gratitude to them. We express our gratitude to Ms T.Karthikayini, our project guide for constantly monitoring the development of the project and setting up precise deadlines. Their valuable suggestions were the motivating factors in completing the work. We would also like to express our gratitude to NHCE and to all our external guides at NHCE for their continuous guidance and motivation. Finally a note of thanks to the teaching and non-teaching staff of Computer Science and Engineering Department for their cooperation extended to us and our friends, who helped us directly or indirectly in the course of the project work. RAHUL.S (1NH12CS741) ANURAG (1NH12CS708) I ABSTRACT In this project ,we are designing a shell script which can be executed on Unix like OS platform such as Ubuntu ,Fedora etc with the aim of helping a novice user to setup and configure the environment and IDE and to repair any existing ones if necessary. We have designed a simple menu driven program which will help the user to go through this setup easily and without any hassle. At each step the program will ask the user to select the particular option listed and display and confirmatory message asking if he wishes to proceed further or abort the menu. This script will ask the user to pick his programming language and then it will check whether the environment for the picked language is setup properly or not. If the environment is not setup then it will automatically download the appropriate packages and it's dependencies from internet and install it and set different environment variables. This project is purely based on scripting and commands of Unix like OS.Most of the new or even experienced programmers of Java ,C, C++,etc don't have deep knowledge of these OS , so they find it hard to setup the appropriate environment for the programming language they prefer to code in.As a result they spend extra time to achieve this.All the programmers new or experienced can use this script and save their time. II CONTENTS 1. INTRODUCTION 1.1. ENVIRONMENT SETUP 1 1.2. PROBLEM DEFINITION 2 1.3. PROJECT PURPOSE 2 1.4. PROJECT FEATURES 2 1.5. MODULES DESCRIPTION 3 2. LITERATURE SURVEY 2.1. FEDORA 4 2.2. C++ 5 2.3. QT TOOLKIT 6 2.4. UBUNTU 7 2.5. JAVA 8 2.6. PYTHON 9 2.7. C 10 2.8. ANDROID 11 2.9. ECLIPSE IDE 12 2.10. GEANY IDE 13 3. REQUIREMENT ANALYSIS 3.1. FUNCTIONAL REQUIREMENTS 14 3.2. NON FUNCTIONAL REQUIREMENTS 14 3.3. HARDWARE REQUIREMENTS 16 3.4. SOFTWARE REQUIREMENTS 16 4. DESIGN 4.1. DESIGN GOALS 17 4.2. SYSTEM ARCHITECTURE 17 4.3. SYSTEM DEVELOPMENT METHODOLOGY 19 III 4.4. FLOW DIAGRAM 21 5. IMPLEMENTATION 5.1. SELECTION OF PLATFORM (OS) 22 5.2. FUNCTIONS USED 23 5.3. COMMANDS USED 31 6. TESTING 6.1 UNIT TESTING 33 6.2 INTEGRATION TESTING 33 6.3 VALIDATION TESTING 34 6.4 SYSTEM TESTING 35 6.5 TESTING OF SHELL SCRIPT 36 7. SNAPSHOTS 41 8. CONCLUSION AND FUTURE ENHANCEMENT 8.1 CONCLUSION 45 8.2 FUTURE ENHANCEMENT 45 BIBLIOGRAPHY 46 IV LIST OF FIGURES 4.1 Unix System Architecture 18 4.2 Waterfall Model 20 4.4 Flow Diagram 21 6.1 Testing Process 34 LIST OF TABLES 6.1Test case for Menu Selection 36 6.2Test case for working of compiler 37 6.3Test case for environment configuration 38 6.4 Test case for IDE setup 39 6.5Test case for repair environment 40 V Environment Setup for PL CHAPTER 1 INTRODUCTION 1.1 ENVIRONMENT SETUP In computers, the term environment when unqualified usually refers to the combination of hardware and software in a computer . In this usage, the term platform is a synonym. We often tend to think of environment as short for operating system environment , but, with the exception of UNIX -based operating systems, the operating system usually implies an underlying hardware microprocessor that the operating system is designed to run on. Environment variables are a set of dynamic named values that can affect the way running processes will behave on a computer. They are part of the environment in which a process runs. For example, a running process can query the value of the TEMP environment variable to discover a suitable location to store temporary files, or the HOME or USERPROFILE variable to find the directory structure owned by the user running the process. They were introduced in their modern form in 1979 with Version 7 Unix, so are included in all Unix operating system flavors and variants from that point onward including Linux and OS X. From PC DOS 2.0 in 1982, all succeeding Microsoft operating systems including Microsoft Windows also have included them as a feature, although with somewhat different syntax, usage and standard variable names. Examples of environment variables include: Path– a list of directory paths. When the user types a command without providing the full path, this list is checked to see whether it contains a path that leads to the command. Home (Unix-like) and USERPROFILE (Microsoft Windows) – indicate where a user's home directory is located in the file system. Temp – location where processes can store temporary files. Dept of CSE, NHCE 1 Environment Setup for PL 1.2 PROBLEM DEFINITION This script program will ask programmer to pick his programming language & then it will check whether the environment and its dependencies for the picked language is properly set up or not, if not set up then it will download the appropriate packages and its dependencies from internet and install it and set the different environment variables. 1.3 PROJECT PURPOSE The main objective of this project is to reduce the burden from the programmers both beginners and novice to set the programming environment for coding because he or she may not be knowing the methods and procedures to do so. This shell script can also be implemented in our college labs to keep a tab on the possible corruption of environment due to various reasons & check on the Integrated Development Environments (IDE) of various programming languages such as ECLIPSE for JAVA. 1.4 PROJECT FEATURES Our scheme was developed to reduce the computational overhead of the experienced programmer as well as to minimize the computational overhead of the rookie user. It uses one of the simplest forms of coding which is programming in shell script. Easier to learn and understand for beginners who are new to OS such as Ubuntu and Fedora. It is a simple and basic menu driven program. Has been designed in two different OS ie Fedora and Ubuntu. Has been implemented for programming langauges such as Java, Python,C,C++ . Dept of CSE, NHCE 2 Environment Setup for PL 1.5 MODULES DESCRIPTION 1.5.1 Setup and Configuration of the environment In this first and main module we have to setup the environment for the selected Programming Langauge under a particular UNIX like OS. In our program we will be setting up and configuring environments for the following programming langauges 1.JAVA 2.C Langauge 3.C++ 4.PYTHON 5.ANDROID. 1.5.2 Setup of Integrated Development Environment(IDE) This phase covers the downloading and installation of various IDE’s for various programming langauges. For example ,the user will be asked whether he wants to download and install Eclipse which Is the Integrated Development Environment for Java.. 1.5.3 Repair the environment & IDE In this module ,should there be any errors in the environment setup or in the installation of Integrated Development Environment ,we can detect these errors and repair them using the script.