Lab Programs List_456

Embed Size (px)

Citation preview

  • 8/3/2019 Lab Programs List_456

    1/14

    JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITYKAKINADA

    III Year B.Tech. IT II-Sem T P C0 3 2

    COMPUTER NETRWORKS AND CASE TOOLS LABObjec tive:

    To Understand the functionalities ofvarious layers of OSI model

    To inculcate object oriented software design

    System/ Software RequirementIntelbased desktop PCs LAN CONNECTED with minimum of166 MHZ orfasterprocessorwithatleast 64 MB RAM and 100 MB free disk spaceTools Such as Rational Rose

    Part - A1. Implement the data link layer framing method s such as character, characterstuffing and bit stuffing.

    2. Implement on a data set of characters the three CRC polynomials CRC 12, CRC 16 and CRC CCIP

    3. Implement Dijkstra s algorithm to compute the Shortest path thru agraph.

    4. Take an exam ple subnet graph with weights indicatingdelay between nodes. Now obtain Routing table arteach node using distanc e vector routing algorithm

    5. Take an example subnet ofhosts . Obtain broadcast tree forit.

    6. Take a 64 bit playing text and encrypt the same using DES algorithm

    7. Write a program to break the above DEScoding

    8. Using RSA algorithm Encrypt a text data and Decrypt the same

    Part - B

    1. The student should take up the case study ofUnified Library application which is mentioned inthe theory,and Model it in different views i.eUse case view, logical view, componen t view,Deployment view,Database design, forward and Reverse Engineering, and Generation ofdocumentation oftheproject.

    2. Student has to take up another case study ofhis/her own interest and do the same what evermentioned in

    first problem. Some of the ideas regarding case studies are given in reference books which were mentionedin theory syllabus can be referred forsomeidea.

    Note : The analysis,design, coding, docume ntation, databas e design of mini project which will be carried outin 4th year should be done in object-orientedapproach using UML and by usingappropriate softwarewhich supports UML, otherwise the mini project will not be evaluated.

    JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY KAKINADA

  • 8/3/2019 Lab Programs List_456

    2/14

    III Year B.Tech. IT II-Sem T P C0 3 2

    Objec tive :

    WEB TECHNOLOGIES LAB

    To create a fully functional website with mvc architecture. To Develop an onlineBook storeusing we can sellbooks (Ex amazo n .com).Hardware and Softwarerequired :

    1. A working comp utersystem with either Windows or Linux2. A web browser either IE orfirefox3. Tomcat web serverand Apach e web server

    4. XML editor like Altova Xml-spy[www .Altova.com/XMLSpy free ] ,5. A databas e either Mysql orOracle6. JVM(Java virtual mach ine) must be installed on yoursystem

    Week-1

    7. BDK(Bean developmen t kit) must be also be installed

    Design the following static web pages required foran online book store web site.

    1) HOME PAGE:The static home page must contain three frames.

    Top frame : Logo and the college name and links to Home page, Login page,Registration page, Catalogue page and Cart page (the description

    ofthese pages will be given below).

    Left frame : At least four links fornavigation, which will display the catalogue of respective links.For e.g.: When you click the linkCSE the catalogueforCSE Books shouldbedisplayed in the Right frame.

    Right frame: The pages to the linksin the left frame must be loadedhere. Initially this pagecontains description of the web site.

    2) LOGIN PAGE:

    http://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpyhttp://www.altova.com/XMLSpy
  • 8/3/2019 Lab Programs List_456

    3/14

    This page lookslikebelow:

    3) CATOLOGUE PAGE:The catalogue page should contain the details ofall the books

    available in the web site in a table. The details should containthe following:

    1. Snap shot of Cover Page.2. Author Name.3. Publisher.4. Price.5. Add to cart button.

  • 8/3/2019 Lab Programs List_456

    4/14

    Note: Week 2 contains the remainingpages and theirdescription.

    Week-2:4) CART PAGE:

    The cart page contains the details about the books which areadded to the cart. The cart page should look like this:

    5) REGISTRATION PAGE:

    Create a registration form with the followingfields

    1) Name (Text field)2) Passwo rd (password field)3) E-mailid (text field)4) Phone number (text field)5) Sex (radio button)6) Date of birth (3 select boxes)

    7) Language s known (check boxes English, Telugu, Hindi,Tamil)8) Address (text area)

    WEEK 3:

    VALIDATION:

    Write JavaScriptto validate the following fieldsofthe above registration page.

    1. Name (Name should contains alphab ets and the lengthshould not be less than6characters).

    2. Passwo rd (Passwo rd shou ld not be less than 6 characters length).3. E-mail id (should not contain any invalid and must follow the standard pattern

    [email protected])

    4. Phone number (Phone number should contain 10 digits only).

    Note : You can also validate the login page with thes e parameters.

    Week-4:

    Design a web page usingCSS (Cascading Style Sheets) which includes the following:

    1) Use different font, styles:In the styledefinition you define how each selectorshould work (font, coloretc.). Then, inthe body of yourpage s, you refer to these selectors to activate the styles.

    mailto:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]
  • 8/3/2019 Lab Programs List_456

    5/14

    Forexample:

    3) Control the repetition of the image with the background-repeat property. As background-repeat: repeat Tiles the image until the entire page is filled, just like an ordinarybackground image in plain HTML.

    4) Definestyles forlinksasA:link A:visitedA:active A:hover

    Example:

  • 8/3/2019 Lab Programs List_456

    6/14

    A:link{text-decoration:none} A:visited {text-decoration: none} A:active{text-decoration:none}A:hover {text-decoration: underline; color: red;}

    5) Work withlayers: Forexample:LAYER 1 ON TOP:LAYER1

    LAYER 2

    LAYER 2 ON TOP:LAYER1LAYER 2

    6) Add a customized cursor: Selector{cursor:value}

    For Example :

    Week-5:

    Write an XML file which will display the Book information which includes the following:1) Title of the book2) Author Name3) ISBN number4) Publishername5) Edition6) Price

    Write a Document Type Definition (DTD) to validate the above XML file. Display the XML fileas follows. The contents should be displayed in a table. The heade rof the table should bein colorGREY. And the Authornames columnshould be displayed in one color and shouldbe capitalized and in bold. Use yourown colors for remainingcolumns. Use XML schema sXSL and CSS for the above purpose. Note: Give at least for 4 books. It should be validsyntactically. Hint: You can use some xml editors likeXML-spy

    Week-6:

    VISUAL BEANS:Create a simple visual bean with a area filled with a color. The shape of the area depen dson the property shape. If it is set to true then the shape of the area is Square and it isCircle, if it is false. The color of the area shou ld be changed dynamically for every mous e

  • 8/3/2019 Lab Programs List_456

    7/14

    click. The colorshou ld also bechanged ifwe change the color in the property window .

    Week-7:

    1) Install TOMCAT web serverand APACHE. While installationassign port number 4040 to

    TOMCAT and 8080 to APACHE. Makesure that these ports are available i.e., no otherprocess is using this port.

    2) Access the above developed static web pages for books web site, usingthese serversby putting the web pages develope d in week-1 and week-2 in the document root.Access the pages by using the urls : h ttp://localhost:4040/rama/books.html (fortomcat)

    http://localhost:8 0 8 0/books.htm l (for Apache)

    Week 8:

    User Authentication :Assume four users user1,user2,user3 and user4 having the passwords pwd1,pwd2,pwd3 and pwd4respectively. Write a servelet for doing the following.

    1. Create a Cookie and add these four user ids and passwords to this Cookie.

    2. Read the user id and passwords entered in the Login form (week1) and authenticate with thevalues (user id and passwords ) available in the cookies.

    If he is a valid user(i.e., user-name and password match) you should welcome him by name(user-name) else you should display You are not an authenticated user . Use init-parameters to do this.Store the user-names and passwords in the webinf.xml and access them in the servlet by using thegetInitParameters() method.

    Week -9 :

    Install a database (Mysql orOracle).

    Create a table which should contain at least the following fields: name, password,email-id, phone numb er(these should hold the data from the registration form). Practice'JDBC' connectivity.

    Write a java program/servlet/JSP to connect to that databas e and extract data fromthe tables and display them. Experiment with various SQL queries. Insert the details of theusers who register with the web site, whenevera new user clicks thesubmit button in theregistration pag e (week2).

    Week-10:

    Write a JSP which does the following job:Insert the details ofthe 3 or 4 users who register with the web site (week9) by usingregistrationform. Authenticate the user when he submits the login form using the user name andpassword from the databas e ( similarto week8 instead of cookies).

    Week-11:

    Create tables in the databas e which contain the details of items (books in our case likeBook name , Price, Quantity, Amount )) of each category. Modify your catalogue pag e(week 2)in such a way that you should connect to the databas e and extract data from thetables and display them in the catalogue page using JDBC.

    Week-12:

    HTTP is a stateless protocol. Session is required to maintain the state.The usermay add some items to cart from the catalog page. He can check the cart page forthe selected items. He may visit the catalogue again and select some more items. Here our

    http://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:8080/books.htmlhttp://localhost:4040/rama/books.htmlhttp://localhost:8080/books.html
  • 8/3/2019 Lab Programs List_456

    8/14

    interest isthe selected items shou ld be added to the old cart rather than a new cart. Multipleusers can dothesame thing at a time(i.e., from different systems in the LAN using the ip-address insteadof localhost).This can be achieved through the use of sessions. Everyuser will have his own session which will be created after his success ful login to thewebsite. When the user logs out his session should get invalidated (by using the methodsession.invalidate() ).

    Modify your catalogue and cart JSP pages to achieve the above mentionedfunctionality using sessions.

    JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY KAKINADA

    IYear B.Tech. IT T P C0 3 4

    ITWORKSHOP

    Objec tives :The IT Workshop for engineers is a 6 training lab course spread over 90 hours. Themodules include training on PC Hardware, Internet & World Wide Web and Productivitytools including Word, Excel, Power Pointand Publisher.PC Hardware introduces the students to a personal computer and its basicperipherals, the process ofassembling a personal comp uter, installation of systemsoftware like MS Windows , Linux and the required device drivers. In addition hardwareand software level troubleshooting process, tips and tricks wou ld be covered.Internet & World Wide Web module introduces the different ways ofhooking the PC on to

    the internet from home and workplace and effectively usage of the internet. Usage ofweb browsers, email, newsgroups and discuss ion forums would be covered. Inaddition, awareness of cyber hygiene, i.e., protecting the personal computer fromgetting infected with the viruses, worms and other cyber attacks would be introduced.Productivity tools module would enable the student s in crafting professional worddocument s, excel spread sheets, power point presentations and personal web sitesusing the Microsoft suite of office tools and LaTeX.

    PC HardwareWeek 1 Task 1 : Identify the peripherals of a comp uter, component s in a CPU and itsfunctions. Draw the block diagram of the CPU along with the configuration of each peripheraland submit to your instructor.

    Week 2 Task 2 : Every student shou ld disassemble and assemble the PC back to

    working condition. Lab instructors should verify the work and follow it up with a Viva. Alsostudents need to go through the video whichshows the process ofassembling a PC. Avideo would be given aspart ofthe course content.

    Week 3 Task 3 : Every student shou ld individually install MS windows on thepersonal computer. Lab instructorshould verify the installation and follow it up with a Viva.

    Week 4 Task 4 : Every student shou ld install Linux on the computer. This computershould havewindows installed. The system should be configuredas dual boot with bothwindows and Linux. Labinstructors should verify the installation and follow it up with a Viva

    Week 5 Task 5 : Several mini tasks would be that covers Basic command s inLinux and Basic system administration in Linux which includes: Basic Linux command s inbas h, Create hard and symbolic link

    s, Text proces

    sing, Using wildcards

    Week 6 Task 6 : Hardware Troubleshoo ting : Student s have to be given a PC whichdoes not boot due to improper assemb ly or defective peripherals. They shou ld identifythe problem and fix it to get the comp uter back to working condition. The work doneshould be verified by the instructorand followed up with a Viva

    Week 7 Task 7 : Software Troubleshoo ting : Students have to be given amalfunctioning CPU due to system software problems. They should identify the problemand fix it to get the comput er back to working condition. The work done should be verifiedby the instructor and followed up with a Viva.

    Week 8 Task 8 : The test consists of various systems with Hardware / Software relatedtroubles,Formatted disks without operating systems.

  • 8/3/2019 Lab Programs List_456

    9/14

    Internet & World WideWebWeek 9 - Task 1 : Orientation & Connec tivity Boot Camp : Students shou ld getconnected to their Local Area Network and access the Internet. In the process theyconfigure the TCP/IP setting. Finally students should demons trate, to the instructor, howto access the websites and email.If there is no internet connectivity preparations need tobe mad e by the instructors to simulate the WWW on the LAN.

    Week 10 - Task 2 : Web Browsers, Surfing the Web : Student s customize their webbrowsers with the LAN proxy settings, bookmarks, search toolbars and pop up blockers.

    Also, plug-ins like Macromedia Flash and JRE forappletsshould be configured.

  • 8/3/2019 Lab Programs List_456

    10/14

    Week 11 - Task 3 : Search Engine s & Netiquette : Students should know what searchengines are and how to use the search engines. A few topics would be given to thestudents for which they need to search on Goog le. This should be demons trated to theinstructors.

    Week 12 - Task 4 : Cyber Hygiene : Student s would be exposed to the various threatson the internet and would be asked to configure their computer to be safe on theinternet. They need to first install an antivirus software, con figure their personal firewalland windows update on their computer. Then they need to customize theirbrowsersto block pop ups, block active x downloads to avoid viruses and/or worms.

    Week 13 Module Test A test which simulatesallof the above tasks would becrafted and given to the students.

    LaTeX andWordWeek 14 Word Orientation : The mentor needs to give an overview of LaTeX andMicrosoft/ equivalent(FOSS) tool word : Importance of LaTeX and MS/ equivalent (FOSS) tool Word as wordProcessors, Details of the four tasks and features that would be covered in each, UsingLaTeX and word Accessing, overview of toolbars, saving files, Using help andresources, rulers, format painter in word.Task 1 : Using LaTeX and word to create project certificate. Features to be covered:-Formatting Fonts in word, Drop Cap in word, Applying Text effects, Using CharacterSpacing, Borders and Colors, Inserting

    Header and Footer, Using Date and Time option in bothLaTeX and Word.

    Week 15 - Task 2 : Creating projec t abstract Features to be covered:-FormattingStyles, Inserting table, Bullets and Numbering, Changing Text Direction, Cellalignmen t,Footnote, Hyperlink,Symbols, Spell Check , Track Changes.

    Week 16 - Task 3 : Creating a Newsletter : Features to be covered:- Table of Content,Newspaper column s, Image s from files and clipart, Drawing toolbar and Word Art,FormattingImage s, Textboxes and Paragraphs

    Week 17 - Task 4 : Creating a Feedback form - Features to be covered- Forms,Text Fields, Inserting objects, Mail Merge in Word.

    Week 18 - LaTeX and Word Module Test - Replicate the given documen tinclusive ofallfeatures

    Exce l

    Week 19 - Excel Orientation : The mentor needs to tell the importance of MS/ equivalent(FOSS ) tool Excel as a Spreadshee t tool, give the detailsof the four task s and featuresthat would be covered in each. Using ExcelAccessing, overview of toolbars, saving excel files, Using helpandresourcesTask 1 : Creating a Scheduler - Features to be covered:- Gridlines, Format Cells,Summation, auto fill, FormattingText

    Week 20 - Task 2 : Calculating GPA - .Features to be covered:- Cell Referencing,

    Formulae in excel average, std.deviation, Charts, Renaming and Insertingworksheets, Hyper linking, Count function, LOOKUP/VLOOKUP

    Week 21 - Task 3 : Performance Analysis - Features to be covered:- Split cells,freeze panes, group and outline, Sorting, Boolean and logical operators, Conditionalformatting

    Week 22 - Task 4 : Cricket Score Card - Features to be covered:-Pivot Tables,Interactive Buttons, ImportingData, Data Protection, DataValidation

    Week 23 Excel Module Test - Replicate the given docume ntinclusive ofallfeatures

  • 8/3/2019 Lab Programs List_456

    11/14

    LaTeX and MS/equivalent (FOSS) toolPowerPoint

    Week 24 - Task1 : Students will be working on basic power point utilities and tools whichhelp them create basic power point presentation. Topic covered during this weekincludes :- PPT Orientation, Slide Layouts, Inserting Text, Word Art, Formatting Text,Bullets and Numbering, Auto Shape s, Lines and Arrows in both LaTeX andPowerpoint.

    Week 25 - Task 2 : Second week helps students in making their presentations

    interactive.Topic covered during this week includes : Hyperlinks, Inserting Images, ClipArt, Audio, Video, Objects, Tables and Charts

    Week 26 - Task 3 : Concentrating on the in and out of Microsoft power point andpresentations in LaTeX. Helps them learn best practices in designing and preparingpower point presentation. Topic covered during this week includes :- Master Layouts(slide, template, and notes), Types ofviews (basic,presentation, slide slotter, notes etc),Inserting Background, textures, DesignTemplates, Hidden slides.

    Week 27 - Task 4 : Entire week concentrates on presentation part of LaTeX and powerpoint. Topic covered during this week includes -Using Auto content wizard, Slide Transition,Custom Animation, Auto Rehearsing

    Week 28 - Task 5 : Power point test would be conducted. Studen ts will be givenmodel power point presentationwhichneeds to be replicated (exactly how itsasked).

    PublisherWeek 29 : Help students in preparing their personal website using Microsoft/ equivalent(FOSS) tool publisher. Topic covered during this week includes - Publisher Orientation,Using Templates, Layouts, Inserting text objects, Editing text objects, Inserting Tables,Working with menu objects, Inserting page s, Hyper linking, Renaming, deleting,modifyingpages, Hosting website.

    REFERENCES :

    1. Comdex Information Technology course tool kit Vikas Gupta, WILEY Dreamtech2. The CompleteComput er upgrade and repair book,3rd edition Cheryl A Schmidt, WILEY

    Dreamtech3. Introduction to Information Techno logy, ITL Education Solutions limited, Pearson

    Education.4. PC Hardware and A+Handbook Kate J. Chase PHI (Microsoft)5. LaTeX Companion Leslie Lamport,PHI/Pea rson.6. All LaTeX and others related material isavailableat

    (a) www.sssolutions.in and(b)www.sontisoftsolutions.org

    http://www.sssolutions.in/http://www.sssolutions.in/http://www.sssolutions.in/http://www.sssolutions.in/http://www.sssolutions.in/http://www.sssolutions.in/http://www.sssolutions.in/http://www.sssolutions.in/http://www.sssolutions.in/http://www.sssolutions.in/http://www.sssolutions.in/http://www.sssolutions.in/http://www.sssolutions.in/http://www.sssolutions.in/http://www.sssolutions.in/http://www.sssolutions.in/http://www.sssolutions.in/http://www.sssolutions.in/http://www.sssolutions.in/http://www.sssolutions.in/http://www.sssolutions.in/http://www.sssolutions.in/http://www.sssolutions.in/http://www.sontisoftsolutions.org/http://www.sontisoftsolutions.org/http://www.sontisoftsolutions.org/http://www.sontisoftsolutions.org/http://www.sontisoftsolutions.org/http://www.sontisoftsolutions.org/http://www.sontisoftsolutions.org/http://www.sontisoftsolutions.org/http://www.sontisoftsolutions.org/http://www.sontisoftsolutions.org/http://www.sontisoftsolutions.org/http://www.sontisoftsolutions.org/http://www.sontisoftsolutions.org/http://www.sontisoftsolutions.org/http://www.sontisoftsolutions.org/http://www.sontisoftsolutions.org/http://www.sssolutions.in/http://www.sontisoftsolutions.org/
  • 8/3/2019 Lab Programs List_456

    12/14

    JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY KAKINADA

    IYear B.Tech. IT T P C0 3 4

    Objectives:COMPUTER PROGRAMMING LAB

    To make the student learn a programminglanguage.

    To teach the student to write programs in C solve the problems

    To Introduce the student to simplelinearand non lineardata structures such aslists, stacks,queues , trees and graphs.

    Recomme nded Systems/Software Requirements:

    Intelbased desktop PC ANSI C Compiler with Supporting Editors

    Week l.a) Write a C program to find the sum ofindividualdigits ofa positive integer.b) A Fibonacci Seque nce is defined as follows: the first and second terms in the

    sequenc e are 0 and 1. Subseque nt terms are found by adding the preceding twoterms in the sequence. Write a C program to generate the first n terms of thesequence.

    c) Write a C program to generate all the prime numbers between 1 and n, where n is a

    valuesupp lied by the user.

    Week 2.a) Write a C program to calculate the

    following Sum: Sum=1-x2/2!+x4/4!-x6/6!+x8/8!-x10/10!

    b) Write a C program toe find the roots ofa quadratic equation.

    Week 3a) Write C programs that use both recursive and non-

    recursive functions i) To find the factorial of a giveninteger.ii) To find the GCD (greatest common divisor) of two given integers.iii) To solve Towers ofHano iproblem.

    Week 4a) The total distance travelled by vehicle int second s is given by distance =ut+1/2at2

    where u and a are the initial velocity (m/sec.) and acceleration (m/sec2). Write Cprogram to find the distancetravelled at regularintervals of time given the values of uand a. The program should provide the flexibility to the user to select his own timeintervals and repeat the calculations fordifferentvalues ofu and a.

    b) Write a C program, which takes two integer operands and one operator form theuser, performs the operation and then prints the result. (Considerthe operators +,-,*, /,% and use SwitchStatement)

    Week 5a) Write a C program to find both the larges and smallest number in a listof integers.b) Write a C program that uses functions to perform the following:

    i) Addition ofTwo Matrices

    ii) MultiplicationofTwo Matrices

    Week 6a) Write a C program that uses functions to perform the followingoperations:

    i) To insert a sub-string in to given main string from agiven position. ii) To delete n Characters from a givenpositionina given string.

    b) Write a C program to determine ifthe given string is a palindrome ornot

    Week 7a) Write a C program that displays the position or index in the string S where the string T

    begins, or 1 if S doesnt containT.b) Write a C program to count the lines, words and characters in a given text.

  • 8/3/2019 Lab Programs List_456

    13/14

    Week 8a) Write a C program to generate Pascalstriangle.b) Write a C program to construct a pyramid ofnumbers.

    Week 9Write a C program to read in two numbers, x and n, and then comp ute the sum of this

    geometricprogression: 1+x+x2+x3+.+xn

    For example: if n is 3 and x is 5, then the program computes 1+5+25+125. Print x, n, thesumPerform error checking. For examp le, the formula does not make sense for negativeexponents ifn is less than 0. Have your program print an error messag e if n

  • 8/3/2019 Lab Programs List_456

    14/14

    integers in ascending order:i) Bubble sort ii) Quick sort

    Week 21Write C programs that implement the following sorting methods to sort a given list ofintegers in ascending order:

    i) Insertionsort ii) Merge sort

    Week 22Write C programs to implement the Lagrange interpolation and Newton- Gregory forwardinterpolation.

    Week 23Write C programs to implement the linearregression and polynomialregression algorithms.

    Week 24Write C programs to implement Trapezoidal and Simpsonmethods.

    Text Books1. C programming and Data Structures, P. Padmanabham , Third Edition, BS Publications2. Data Structures: A pseudo code approach with C, second edition R.F. Gilberg and B.A.

    Forouzan3. Programming in C, P.Dey & M. Ghosh, Oxford Univ.Press.4. C and Data Structures, E Balaguruswamy, TMH publications.