30
Project Documentation Mickey Mouse Program Submitted by: Guided by: Sandeep Singh Ms. Suhasini Monga Sahil Talwar Assistant Professor Roll no. A20 & A21 Section RA3802 Registration no. 10805743 10805845 Lovely Professional University 1 | Page

Project Documentation of Mickey Mouse Program

Embed Size (px)

DESCRIPTION

Mickey Mouse Program in c language

Citation preview

Page 1: Project Documentation of Mickey Mouse Program

Project DocumentationMickey Mouse Program

Submitted by: Guided by:

Sandeep Singh Ms. Suhasini MongaSahil Talwar Assistant ProfessorRoll no. A20 & A21Section RA3802Registration no. 10805743

10805845Lovely Professional University

1 | P a g e

Page 2: Project Documentation of Mickey Mouse Program

Certificate

This is to certify that this dissertation entitled “Mickey Mouse Program” submitted for the degree of Bachelors of computer applications (BCA hons) in the subject of

Computer Application Department to the Lovely Professional University (Phagwara), work carried out by

Sandeep Singh and Sahil Talwar Registration no. 10805743 and 10805845 under the guidance in partial fulfillment of the requirement for the course: Computer

Graphics (CAP 367)

Ms.Suhasini Monga Ms. Kuljeet KaurAsst. Professor Asst. ProfessorFaculty Advisor COD

2 | P a g e

Page 3: Project Documentation of Mickey Mouse Program

Declaration

I hereby declare that the project work entitled “MICKEY MOUSE PROGRAM” is an authentic record of my own work carried out at Lovely Professional University as

requirements of project for the award of degree of BCA (Hons.) Lovely Professional University, Phagwara, under the guidance of Ms. Suhasini Monga during February to

May, 2011.

Sandeep Singh

Sahil Talwar RA3802A20

3 | P a g e

Page 4: Project Documentation of Mickey Mouse Program

RA3802A21 Reg. No.

10805743 10805845

Acknowledgement

My deep gratitude, fullness which I have for my madam, Ms. Suhasini Monga , under whose guidance, advice, help, inspiration and encouragement it is easy

for me to make this project and also for his contribution in coordination and cooperating us during the course of development. He enriched us with knowledge whenever

we reached him.I am also thankful to my colleagues with whom I have

fruitful discussions which have helped us a lot in giving a final shape to the program.

At last but not the least I express our heartiest gratitude towards almighty for providing us the

environment and support.

4 | P a g e

Page 5: Project Documentation of Mickey Mouse Program

Sandeep Singh

Sahil Talwar RA3802A20 RA3802A21

Reg. No. 10805743

10805845

CONTENTS

Sr. No. TOPICS Page No.

1 Project Name and Description 6

2 Profile of the problem 7

3 Existing System Existing Software DFD of present system

7-8

8

4 Problem Analysis Problem Definition Feasibilty Analysis Project Plan

99

5 Software Requirement Analysis 10

5 | P a g e

Page 6: Project Documentation of Mickey Mouse Program

Introduction General Description Specific Requirements

6 Design System Design Detailed Design Pseudo code

11-14

7 Testing Functional Testing Structural testing

14-15

8 Implementation 9 Project Legacy

Current status of project Remaining area of concern

15

10 User Manual 15

11 Source Code Final Output

16-2122-23

12 Bibliography24

6 | P a g e

Page 7: Project Documentation of Mickey Mouse Program

1. Project Name and Description:

Name of Project:- “Mickey Mouse Program”

Project Description:- The project includes different modules that are needed to generate different pictures

into a single animated picture (include motion of pictures) in same program in a same

time. In this project we can display a picture of Mickey Mouse with the help of

motion as it looks like animated. The project Mickey mouse program will be made by

the use of arcs, lines, circle, ellipse etc. We can add some colour to Mickey mouse so

that it will be seen attractive. This project includes animated Mickey mouse that

includes smiley face using arcs, lines, circles, ellipse etc. This application is easy to

use and display an animated Mickey mouse. It can use in animation or animated

movies. It will be the full source of entertainment.

Header Files in our project:

#include<graphics.h>: It is used to draw graphical objects in our project.

#include<conio.h>: It is a C header file used in old MS-DOS compilers to create text user interfaces.

#include<dos.h>: It is used to move the car in our project.

#include<stdio.h>: It is used for printf and scanf in our project.

In this project, We used different predefined functions to create Mickey Mouse Program. Some of the in built functions which we have mostly used to create Mickey Mouse Program are:

1. line() : This function helped us in making doors, mirrors, bumper, light, rear etc of the car.

2. Ellipse() : Ellipse function is used in our project for making the roof and tyers of the car.

3. floodfill() : This function helped us in our project to fill a specific part to make it more attractive.

4. setfillstyle() : This function helped us making different patterns on the car such as dotted lines etc.

5. outtextxy(): It is used in our project to place text on the output screen.

7 | P a g e

Page 8: Project Documentation of Mickey Mouse Program

2. Profile of the problem :-

It is time consuming.

It is very tedious.

It includes a lot of paper work.

It is very complex and not easy to understand.

3. Existing System :-

a) Exiting software :- Not any specific system for this at this time.

b) DFD for Present system :-

8 | P a g e

Page 9: Project Documentation of Mickey Mouse Program

Yes Correct Errors

Errors

No Errors

9 | P a g e

Start

Declarations

Designing

Coding

Compile

Execute

Display Output

END

Header Files

Datatypes

Assigning variables

Shapes ellipse,line

Styles

Colors,Patterns Animations

Errors

Check Errors

Page 10: Project Documentation of Mickey Mouse Program

4. Problem Analysis :- In this projects we face two problem’s

Void left () function----this function help to club the pixels from one place to another.

Set fill / flood fill---These function help to change the view of the project like pattern of colour, its colour /design.

a) Product definition:- The project includes different modules that are needed to generate different pictures into a single animated picture (include motion of pictures) in same program in a same time. In this project we can display a picture of Mickey Mouse with the help of motion as it looks like animated. The project Mickey mouse program will be made by the use of arcs, lines, circle, ellipse etc. We can add some colour to Mickey mouse so that it will be seen attractive. This project includes animated Mickey mouse that includes smiley face using arcs, lines, circles, ellipse etc. This application is easy to use and display an animated Mickey mouse. It can use in animation or animated movies. It will be the full source of entertainment.

b) Feasibility Analysis----

Technical feasibility: I can develop this kind of system in Turbo c++ which is flexible. Easy to make changes in turbo c++

Operational feasibility: This system is totally feasible respect to operations and functionality Calculation can be done by simple mathematics.

Cost feasibility: No additional hardware is required to develop the program We need Turbo c++ and DosBox.

c) Project Plan :-

First of all we decide to making of project we draw it like:--

Arc’s Lines Ellipse flood fill set-fill

Then we start to making the project.

10 | P a g e

Page 11: Project Documentation of Mickey Mouse Program

5. Software requirement Analysis:

a. Introduction:- C is an imperative (procedural) systems implementation

language. It was designed to be compiled using a relatively straightforward

compiler, to provide low-level access to memory, to provide language

constructs that map efficiently to machine instructions, and to require

minimal run-time support. C was therefore useful for many applications

that had formerly been coded in assembly language.

b. General Description :-Despite its low-level capabilities, the language

was designed to encourage cross-platform programming. A standards-

compliant and portably written C program can be compiled for a very wide

variety of computer platforms and operating systems with few changes to

its source code. The language has become available on a very wide range

of platforms, from embedded micro controllers to supercomputers.

Operating system: Windows 9.x, Windows 2000, Windows XP, Windows Vista, Windows 7.

c. Specific Requirements :-It will work on windows only because .exe files do not work on linux or unix. Compiler is needed to edit the project in future in case of any user requirements.

11 | P a g e

Page 12: Project Documentation of Mickey Mouse Program

6. Design----

a. System Design :- Systems design is the process of defining the components, modules, interfaces, and data for a system to satisfy specified requirements and we have divided our project into different modules for its better understanding and to make it user friendly.

b. Detailed design :-

Starting Phase of project:-

Second Phase:-

12 | P a g e

Page 13: Project Documentation of Mickey Mouse Program

Final Output:-

13 | P a g e

Page 14: Project Documentation of Mickey Mouse Program

c. Pseudo code :- An algorithm is a procedure for solving a problem in terms of the actions to be executed and the order in which those actions are to be executed. An algorithm is merely the sequence of steps taken to solve a problem. The steps are normally "sequence," "selection, " "iteration," and a case-type statement. In C, "sequence statements" are imperatives. The "selection" is the "if then else" statement, and the iteration is satisfied by a number of statements, such as the "while," " do," and the "for," while the case-type statement is satisfied by the "switch" statement. Pseudo code is an artificial and informal language that helps programmers develop algorithms. Pseudo code is a "text-based" detail (algorithmic) design tool. The rules of Pseudo code are reasonably straightforward. All statements showing "dependency" are to be indented. These include while, do, for, if, switch. Examples below will illustrate this notion.

while(!kbhit()){if(i==0){setfillstyle(1,15);setcolor(15);ellipse(210,133,0,360,10,10);//left eye ballellipse(265,133,0,360,10,10);//right eye ballsetcolor(0);ellipse(210,133,0,360,3,3);//left eye ballellipse(265,133,0,360,3,3);//right eye ballfloodfill(210,133,15);floodfill(265,133,15);setcolor(0);putimage(391,209,buf,1);

14 | P a g e

Page 15: Project Documentation of Mickey Mouse Program

firstleft();setcolor(15);secondleft();putimage(409,224,buf,0);i=1;}else{setfillstyle(1,0);setcolor(0);ellipse(210,133,0,360,10,10);//left eye ballellipse(265,133,0,360,10,10);//right eye ballfloodfill(210,133,0);floodfill(265,133,0);setcolor(15);ellipse(210,133,0,360,3,3);//left eye ballellipse(265,133,0,360,3,3);//right eye ballfloodfill(210,133,15);floodfill(265,133,15);setcolor(0);putimage(409,224,buf,1);secondleft();setcolor(15);firstleft();putimage(391,209,buf,0);i=0;}delay(300);}

7. Testing :- We test the project after completing the step by step.after complete every step of project we check it if step run properly then we start coding for next step.it help to making project easily..

a. Functional Testing :- Testing is an investigation conducted to information about the quality of the product or service under test. Software testing also provides an objective, independent view of the software to allow the business to appreciate and understand the risks of software implementation. Test techniques include, but are not limited to, the process of executing a program or application with the intent of finding software bugs .

b. Structural Testing :- Structural testing on checking that all executable statements within each module have been exercised and the corresponding branches and paths through that module have been covered. Structural testing can therefore be considered as concentrating on checking that the control logic operates correctly. The coverage measurements that fall into this category are: statement, branch, condition and expression, and path coverage.

15 | P a g e

Page 16: Project Documentation of Mickey Mouse Program

c. Testing of the Project :- We have tested our project in different modules. The project is running successful with no errors.

8. Implementation

a. Implementation of the project Implementation of the project in the organization will include various things. Organization should have compatible hardware and software to implement this. And Executable file of this project is given to end users so that they can use the software.

9. Project Legacy :- We don’t copy any type of code of the project. We make the project with the help of two books-

Computer Graphics C Version LET US C ANSI C

And with own knowledge/and teacher help.

a. Current status of project :- The current status is the project the totally complete. Nothing is rest.

b. Remaining area of concern :- No Remaining area of concern in the project. the project the totally complete. Nothing is rest.

c. Technical and Managerial Lessons learned :- Technically, we learned how to create animated project using C language and to make it more attractive.Managerial lessons we learnt from this project is how to manage do work as a team.

10.User Manual :- First of all you have to install turbo c++ in your operating system. After installation open the (c:\) drive from My computer. And then save the file in C:\turbo\Tc folder. Open your turbo c++. Then from menu bar open the newmickey.c file and run it.

16 | P a g e

Page 17: Project Documentation of Mickey Mouse Program

11.Source code :-

#include<graphics.h>#include<dos.h>#include<conio.h>#include<alloc.h>void *buf;void firstleft();void secondleft();void main(){int gd=DETECT,gm,i=0,x,y,area;initgraph(&gd,&gm,"tc:\bgi");rectangle(0,0,getmaxx(),getmaxy());outtextxy(250,10,"MICKEY MOUSE PROGRAM");outtextxy(520,100,"SAHIL TALWAR");outtextxy(518,120,"SANDEEP SINGH");arc(240,120,40,140,70);ellipse(165,80,10,280,20,20);ellipse(315,80,-100,170,20,20);arc(235,120,163,215,70);arc(245,120,-35,17,70);ellipse(193,178,85,280,40,20);ellipse(283,178,-100,95,40,20);ellipse(238,199,180,0,39,50);ellipse(213,123,44,240,33,40);ellipse(262,123,-60,135,33,40);ellipse(210,123,0,360,13,20);//left eyeellipse(265,123,0,360,13,20);//right eyeellipse(210,133,0,360,10,10);//left eye ballellipse(265,133,0,360,10,10);//right eye ballellipse(210,133,0,360,3,3);//left eye ballellipse(265,133,0,360,3,3);//right eye ballellipse(238,160,0,360,10,13);//nosearc(240,125,228,312,68);//mouth

17 | P a g e

Page 18: Project Documentation of Mickey Mouse Program

arc(240,120,230,310,72);//mouthsetfillstyle(1,4);floodfill(238,160,15);//nosesetfillstyle(1,5);floodfill(210,113,15);floodfill(265,113,15);setfillstyle(1,6);floodfill(210,100,15);setfillstyle(1,0);floodfill(315,80,15);/*setfillstyle(1,4);floodfill(238,160,15);//nosesetfillstyle(1,15);floodfill(210,113,15);floodfill(265,113,15);setfillstyle(1,9);floodfill(210,100,15);setfillstyle(1,1);floodfill(315,80,15); */moveto(203,220);lineto(203,260);lineto(183,260);lineto(183,350);lineto(293,350);lineto(293,260);lineto(273,260);lineto(273,220);moveto(183,350);lineto(173,460);lineto(213,460);lineto(238,400);lineto(263,460);lineto(303,460);lineto(293,350);moveto(173,460);lineto(143,478);lineto(213,478);lineto(213,460);

18 | P a g e

Page 19: Project Documentation of Mickey Mouse Program

moveto(263,460);lineto(263,478);lineto(333,478);lineto(303,460);line(238,400,238,350);//right handmoveto(183,260);lineto(113,310);lineto(183,375);moveto(183,280);lineto(137,310);lineto(181,353);setfillstyle(8,4);floodfill(190,300,15);setfillstyle(6,9);floodfill(223,400,15);setfillstyle(6,9);floodfill(253,400,15);setfillstyle(9,2);floodfill(173,470,15);floodfill(303,470,15);/*setfillstyle(2,13);floodfill(190,300,15);setfillstyle(1,5);floodfill(223,400,15);setfillstyle(1,5);floodfill(253,400,15);setfillstyle(1,6);floodfill(173,470,15);floodfill(303,470,15);*///fingerssecondleft();ellipse(413.5,228,0,180,3.5,3.5);line(420,240,433,240);line(423,247,440,247);line(413,240,410,228);line(417,228,420,240);

19 | P a g e

Page 20: Project Documentation of Mickey Mouse Program

ellipse(433,243.5,-90,90,3.5,3.5);line(423,254,440,254);ellipse(440,250.5,-90,90,3.5,3.5);ellipse(430,257,-90,90,3,3);line(413,260,430,260);area=imagesize(409,224,444,261);buf=malloc(area);getimage(409,224,444,261,buf);while(!kbhit()){if(i==0){setfillstyle(1,15);setcolor(15);ellipse(210,133,0,360,10,10);//left eye ballellipse(265,133,0,360,10,10);//right eye ballsetcolor(0);ellipse(210,133,0,360,3,3);//left eye ballellipse(265,133,0,360,3,3);//right eye ballfloodfill(210,133,15);floodfill(265,133,15);setcolor(0);putimage(391,209,buf,1);firstleft();setcolor(15);secondleft();putimage(409,224,buf,0);i=1;}else{setfillstyle(1,0);setcolor(0);ellipse(210,133,0,360,10,10);//left eye ballellipse(265,133,0,360,10,10);//right eye ballfloodfill(210,133,0);floodfill(265,133,0);

20 | P a g e

Page 21: Project Documentation of Mickey Mouse Program

setcolor(15);ellipse(210,133,0,360,3,3);//left eye ballellipse(265,133,0,360,3,3);//right eye ballfloodfill(210,133,15);floodfill(265,133,15);setcolor(0);putimage(409,224,buf,1);secondleft();setcolor(15);firstleft();putimage(391,209,buf,0);i=0;}delay(300);}getch();}void firstleft(){moveto(293,260);lineto(353,276);lineto(395,223);moveto(293,280);lineto(355,296);lineto(395,245);}void secondleft(){moveto(293,260);lineto(363,280);lineto(413,240);moveto(293,280);lineto(363,300);lineto(413,260);}

21 | P a g e

Page 22: Project Documentation of Mickey Mouse Program

Final Output:-

22 | P a g e

Page 23: Project Documentation of Mickey Mouse Program

23 | P a g e

Page 24: Project Documentation of Mickey Mouse Program

12.Bibliography :- Computer Graphics C version LET US C ANSI C http://www.unf.edu/~broggio/cop3530/3530pseu.htm http://www.whitehatandroid.com/2010/09/dosbox-run-turbo-c-

in-windows-7vista-in.html

24 | P a g e