Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

TEST VITA

DS MINI PROJECT
SUBMITTED BY

SUKUNA D - 717821D156

RIFFATH S - 717821D139

VIJAY RAJ S - 717821D162

In partial fulfillment for the award of the degree

Of

BACHELOR OF ENGINEERING

in

COMPUTER SCIENCE AND DESIGN


1.ABSTRACT
2.REQUIREMENT SPECIFICATION
3.DATASTRUCTURE USED ARRAY
DATASTRUCTURE
4.ALGORITHM
5.SOURCE CODE
6.OUTPUT SCREENSHOT
7.CONCLUSION
ABSTRACT :
The testvita application presented here is a very simple console

application developed using c programming language.It is built without

using graphics properties instead it utilizes many windows properties


to

give the application a colorful look and feel.It provides a very simple

interface and displays the details like module ID , number of hours its

takes to complete the module i,set of modules Id’s that i depends on –

integer delimited by space.

PROBLEM STATEMENT:

TCS is working on a new project called "TestVita". There are N modules in the
project. Each module

(i) has completion time denoted in number of hours (Hi) and may depend on other
modules. If
Module x depends on Module y then one needs to complete y before x. As Project
manager, you are asked to deliver the project as early as possible.
Provide an estimation of amount of time required to complete the project.

Input Format:

First line contains T, number of test cases.


For each test case:

1.First line contains N, number of modules.


2. Next N lines, each contain:

∙ (i) Module ID
∙ (Hi) Number of hours it takes to complete the module
∙ (D) Set of module ids that i depends on - integers delimited by space.

Output Format:

Output the minimum number of hours required to deliver the project. Constraints:

1. 1 <= T <= 10
2. 0 < N < 1000; number of modules
3. 0 < i <= N; module ID
4. 0 < Hi < 60; number of hours it takes to complete the module i
5. 0 <= |D| < N; number of dependencies
6. 0 < Dk <= N; module ID of dependencies

REQUIREMENT SPECIFICAFTION:-

HARDWARE REQUIREMENTS

Processor : Core i3 RAM : 128MB


Hard Disk : 20GB
Monitor : 15” Color monitor
Key Board : 104 Keys

SOFTWARE REQUIREMENTS

Operating System : Windows 10.


Language : C
Software : ONLINE C COMPILER
DATA STRUCTURE USED ARRAY DATASTRUCTURE:-

• An Array data structure, or simply an Array is a data structure


consisting of a collection of elements,each identified by atleast one
array index or key. An Array is stored such that position of each
element can be computed from its index.
• The simplest type of data structure is a linear array ,also called
one- dimensional array. The elements of an array data structure are
required to have the same size and should use the same data
representation.
• Arrays are among the oldest and most important data structure,
and are used in almost every program . They are also used to implement
many other data structure, such as strings and lists.

APPLICATIONS:-

➢ Arrays are used to implement other data structures ,such as lists,


heaps,hash tables ,queues ,stacks, strings etc.,

➢ Array-based implementations of other data structures are


frequently simple and space efficient, requiring little space overhead.

➢ Arrays can be used to determine partial or complete control flow


in programs , as a compact alternatives to multiple if statements.

➢ Arrays are used to implement mathematical vectors matrices, as


well as other kinds of rectangular tables.

ALGORITHM :

BEGIN :
STEP 1:Declare an integer data type as n , sum =0,q,a.

STEP 2: Declare an array in integer data type as m[10],t[10],d[10].

STEP 3: Get the input as a by using scanf

STEP 4:Initialize the for loop

STEP 5: Get the array using scanf such that m[10],t[10],d[10].

STEP 6:Using selection statement check the condition

if(d[i]==d[i+1]
if(t[i]<t[i+1])
t[i]=0; else
t[i+1]=0;

STEP 7: Initialize loop statement and give condition inside the for loop
as sum =sum+t[i]

STEP 8:Using printf statement print the sum.

STEP 9: Display the output

STOP

SOURCE CODE :

#include <stdio.h>
int main()

int n,m[10],t[10],d[10],q,a,i,sum=0;

scanf("%d",&a);

for(q=1;q<=a;q++)

scanf("%d",&n);

for(i=0;i<n;i++)

scanf("%d %d %d",&m[i],&t[i],&d[i]);

for(i=0;i<n-1;i++)

{
if(d[i]==d[i+1])

{
if(t[i]<t[i+1])

t[i]=0;

else

t[i+1]=0;

for(i=0;i<n;i++)

{
sum=sum+t[i];
}

printf("%d",sum);

return 0;

OUTPUT :

CONCLUSION :

Our project is humble venture to display the details like module ID ,


number of hours its takes to complete the module i,set of modules Id’s
that I depends on –integer delimited by space.
The objective of software planning is to provide the frame work
that enables the minimum number of hours required to deliver the
project.

You might also like