Структура иерархии классов "Экран курсового проектирования"

Курсовой проект - Компьютеры, программирование

Другие курсовые по предмету Компьютеры, программирование

p>

TName="Default";

}

Файл TStudent.h

#pragma once

#include "TObject.h"

using namespace System;

 

ref class TStudent :

public TObject

{

public:

 

System::Int16 ControlScore;

System::Int16 NumberWeek;

System::Int16 *Plan;

System::Int16 *Fact;

System::Int16 *Control

 

System::String ^Test;

System::String ^TestF;

System::String ^Revision;

System::String ^RevisionF;

System::String ^Protection;

System::String ^ProtectionF;

 

virtual void SetName(System::String ^) override;

void SetNumberWeek(System::Int16 );

void SetPlan(System::Int16 , System::Int16);

void SetFact(System::Int16, System::Int16);

void SetControl(System::Int16, System::Int16);

 

void SetTest(System::String ^ );

void SetTestF(System::String ^ );

void SetRevision(System::String ^ );

void SetRevisionF(System::String ^ );

void SetProtection(System::String ^ );

void SetProtectionF(System::String ^ );

 

void SetControlScore(System::Int16 );

 

TStudent(void);

};

Файл TStudent.cpp

#include "StdAfx.h"

#include "TStudent.h"

 

 

void TStudent::SetName(String ^name){

TName=name;

}

 

void TStudent::SetNumberWeek(System::Int16 num){

NumberWeek=num;

}

 

void TStudent::SetPlan(System::Int16 num1, System::Int16 num2){

Plan[num2]=num1;

}

 

void TStudent::SetFact(System::Int16 num1, System::Int16 num2){

Fact[num2]=num1;

}

 

void TStudent::SetControl(System::Int16 num1, System::Int16 num2){

Control[num2]=num1;

}

 

void TStudent::SetTest(String ^ num){

Test=num;

}

 

void TStudent::SetTestF(String ^ num){

TestF=num;

}

 

void TStudent::SetRevision(String ^ num){

Revision=num;

}

 

void TStudent::SetRevisionF(String ^ num){

RevisionF=num;

}

 

void TStudent::SetProtection(String ^ num){

Protection=num;

}

 

void TStudent::SetProtectionF(String ^ num){

ProtectionF=num;

}

 

void TStudent::SetControlScore(System::Int16 score){

ControlScore=score;

}

 

TStudent::TStudent(void)

{

Plan=new System::Int16[3];

Fact=new System::Int16[3];

Control=new System::Int16[3];

}

 

Файл TScreen.h

#pragma once

#include "TObject.h"

#include "TStudent.h"

 

using namespace System;

 

using namespace System::Collections::Generic;

 

ref class TScreen :

public TObject

{

public:

System::String ^ Date;

System::String ^ Composition;

 

virtual void SetName(System::String ^) override;

void SetDate(System::String ^);

void SetComposition(System::String ^);

 

public:

TScreen(void);

};

Файл TScreen.cpp

#include "StdAfx.h"

#include "TScreen.h"

 

 

void TScreen::SetName(System::String ^s){

TName=s;

}

 

void TScreen::SetComposition(System::String ^s){

Composition=s;

}

 

void TScreen::SetDate(System::String ^s){

Date=s;

}

 

 

TScreen::TScreen(void)

{

 

}

Приложение В

 

Листинг тестирующего приложения

Файл Form1.h. Главное окно.

#pragma once

 

#include "Form2.h"

#include "TScreen.h"

#include "Start.h"

#include "Search.h"

 

namespace WindowsFormApplicationC {

 

using namespace System;

using namespace System::ComponentModel;

using namespace System::Collections;

using namespace System::Windows::Forms;

using namespace System::Data;

using namespace System::Drawing;

using namespace System::Collections::Generic;

 

public ref class Form1 : public System::Windows::Forms::Form

{

public:

private: System::Windows::Forms::MenuStrip^ menuStrip1;

private: System::Windows::Forms::ToolStripMenuItem^ fileToolStripMenuItem;

private: System::Windows::Forms::ToolStripMenuItem^ exitToolStripMenuItem;

private: System::Windows::Forms::ToolStripMenuItem^ helpToolStripMenuItem;

private: System::Windows::Forms::ToolStripMenuItem^ aboutToolStripMenuItem;

private: System::Windows::Forms::Button^ button4;

private: System::Windows::Forms::Button^ button5;

 

public:

TStudent ^Student;

TScreen Screen;

System::Int16 CountDataGrid;

 

private: System::Windows::Forms::Button^ button6;

private: System::Windows::Forms::Button^ button7;

private: System::Windows::Forms::Button^ button1;

private: System::Windows::Forms::Button^ button2;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column1;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column2;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column3;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column4;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column5;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column6;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column7;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column8;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column9;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column10;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column11;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column12;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column13;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column14;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column15;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column16;

private: System::Windows::Forms::DataGridViewTextBoxColumn^ Column17;

private: System::Windows::Forms::ToolStripMenuItem^ aboutToolStripMenuItem1;

private: System::Windows::Forms::ListBox^ listBox1;

private: System::Windows::Forms::ListBox^ listBox2;

private: System::Windows::Forms::CheckBox^ checkBox1;

 

public:

Form1(void)

{

InitializeComponent();

Student=gcnew TStudent;

CountDataGrid=0;

}

protected:

 

~Form1()

{

if (components)

{

delete components;

}

}

private: System::Windows::Forms::DataGridView^ dataGridView1;

protected:

private:

System::ComponentModel::Container ^components;

 

#pragma region Windows Form Designer generated code

///

/// Required method for Designer support - do not modify

/// the contents of this method with the code editor.

///

void InitializeComponent(void)

{

System::Windows::Forms::DataGridViewCellStyle^ dataGridViewCellStyle2 = (gcnew System::Windows::Forms::DataGridViewCellStyle());

this->dataGridView1 = (gcnew System::Windows::Forms::DataGridView());

this->Column1 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->Column2 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->Column3 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->Column4 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->Column5 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->Column6 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->Column7 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->Column8 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->Column9 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->Column10 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->Column11 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->Column12 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->Column13 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->Column14 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->Column15 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->Column16 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->Column17 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());

this->menuStrip1 = (gcnew System::Windows::Forms::MenuStrip());

this->fileToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenu