Step1 : Design the use case diagram under the use case view. Sequence,class,
collaboration, activity, statechart diagram under the logical view,
component diagram under component view,deployment
diagram under the deployment view for the student mark analysis system.
Step2 : Select the menu tool in that choose the OPTION in that choose the tab
NOTATION and set the default language as ANSI C++ and click ok;
Step3 : Go to the component view in that select any one of the relevant component in the
Component diagram and right click the component and choose open specification
and click the REALIZE tab and assign the classes listed.
Step4 : Right click the same component, choose open specification and select
GENERAL tab set the language and press apply.
Step5 : Select the same component in the browser window, right click it and click
GENERATE CODE. The directory window specify the directory path to the
header file and cpp files are to be stored and press ok.
Step6 : All the required files will be generated in the specified directory. If any change is
done in the class diagram, do the above steps again.
Programming Source Code in C++
Student.h:
#ifndef STUDENT_H_HEADER_INCLUDED_B752DC1E
#define STUDENT_H_HEADER_INCLUDED_B752DC1E
//##ModelId=489190F3038A
class student
{
public:
//##ModelId=489196F8035B
getdata();
//##ModelId=489197050280
dis data();
//##ModelId=4891970C032C
insert();
//##ModelId=4891971003C8
delete();
//##ModelId=4891971500AB
update();
private:
//##ModelId=4891964F033C
string name;
//##ModelId=4891967C005D
integer regno;
//##ModelId=4891965E004E
integer stuid;
//##ModelId=4891966302AF
string branch;
//##ModelId=4891966F0280
string address;
};
Student.cpp:
#include "student.h"
//##ModelId=489196F8035B
student::getdata()
{
}
//##ModelId=489197050280
student::dis data()
{
}
//##ModelId=4891970C032C
student::insert()
{
}
//##ModelId=4891971003C8
student::delete()
{
}
//##ModelId=4891971500AB
student::update()
{
}
Book.h:
#ifndef BOOK_H_HEADER_INCLUDED_B752D187
#define BOOK_H_HEADER_INCLUDED_B752D187
//##ModelId=4891972001E4
class book
{
public:
//##ModelId=4891975F005D
getdata();
//##ModelId=48919768008C
disdata();
//##ModelId=4891977E0148
insert();
//##ModelId=4891978F035B
delete();
//##ModelId=48919796033C
delete();
//##ModelId=4891979B008C
update();
//##ModelId=4891979F036B
search();
private:
//##ModelId=4891972D0261
string name;
//##ModelId=48919738030D
string auther;
//##ModelId=4891973D000F
string publisher;
//##ModelId=4891974300FA
integer price;
//##ModelId=48919748005D
integer quantity;
//##ModelId=4891974E01E4
integer accno;
};
#endif /* BOOK_H_HEADER_INCLUDED_B752D187 */
Book.cpp
include "book.h"
//##ModelId=4891975F005D
book::getdata()
{
}
//##ModelId=48919768008C
book::disdata()
{
}
//##ModelId=4891977E0148
book::insert()
{
}
//##ModelId=4891978F035B
book::delete()
{
}
//##ModelId=48919796033C
book::delete()
{
}
//##ModelId=4891979B008C
book::update()
{
}
//##ModelId=4891979F036B
book::search()
{
}
Finecalcu.h
#ifndef FINECALCU_H_HEADER_INCLUDED_B752A06E
#define FINECALCU_H_HEADER_INCLUDED_B752A06E
//##ModelId=489198280138
class finecalcu
{
public:
//##ModelId=4891985D0128
check();
//##ModelId=4891986202EE
cal();
private:
//##ModelId=4891983E0148
integer studid;
//##ModelId=489198460138
integer accno;
//##ModelId=48919849003E
date issdate;
//##ModelId=4891984D00FA
date retdate;
//##ModelId=489198510109
integer amount;
};
#endif /* FINECALCU_H_HEADER_INCLUDED_B752A06E */
Finecalcu.cpp:
#include "finecalcu.h"
//##ModelId=4891985D0128
finecalcu::check()
{
}
//##ModelId=4891986202EE
finecalcu::cal()
{
}
0 Comments