Розробка веб-системи продажі білетів театру

Автор работы: Пользователь скрыл имя, 31 Мая 2013 в 01:06, курсовая работа

Описание

Метою даного курсового проекту є розробка програми, що надає собою доступ до покупки квитків театру в інтернеті. Додаток заснований на технології Java EE і активно використовує його можливості по створенню розподілених інформаційних систем

Содержание

ПЕРЕЧЕНЬ УСЛОВНЫХ ОБОЗНАЧЕНИЙ, СИМВОЛОВ, ЕДИНИЦ, СОКРАЩЕНИЙ И ТЕРМИНОВ 8
ВВЕДЕНИЕ 9
1 АНАЛИЗ РАБОТЫ 11
1.1 Ключевые понятия 11
1.2 Описание работы 12
2 ТЕХНИЧЕСКАЯ РЕАЛИЗАЦИЯ 13
2.1 Выбор технологии реализации 13
2.1 Анализ работы с сервлетами и JSP-страницами 14
3 СТРУКТУРА ПРИЛОЖЕНИЯ 15
3.1 Структура базы данных 15
3.2 Разработа структуры взаимодействия компонентов программы 15
3.3 Разработка сервлета действия 17
3.4 Разработка внешнего вида приложения 19
4 ИНТЕРФЕЙС И РАБОТА ПРОГРАММЫ 20
5 ТЕСТИРОВАНИЕ 18
5.1 Технические требования 18
5.1 Тестирование программы 18
ВЫВОДЫ 20
ПЕРЕЧЕНЬ ССЫЛОК 21
ПРИЛОЖЕНИЕ А 23

Работа состоит из  1 файл

ККП Даниленков Д.О. КИ-08-2.doc

— 844.50 Кб (Скачать документ)

}

public void setName(String name) {

this.name = name;

}

public String getAuthor() {

return author;

}

public void setAuthor(String author) {

this.author = author;

}

public String getGenre() {

return genre;

}

public void setGenre(String genre) {

this.genre = genre;

}

 

public Play(int id, String name, String author, String genre, Show show) {

this.id = id;

this.name = name;

this.author = author;

this.genre = genre;

show.addPlay(this);

}

public Play(){

 

}

@Override

public boolean equals(Object plays){

Play play = (Play)plays;

if (this == plays){

return true;

}

else if (!(plays instanceof Play)) {

return false;

}

else if (this.id == play.id && this.name == play.name &&

this.author == play.author && this.genre == play.genre) {

return true;

}

else {

return false;

}

}

 

@Override

public int hashCode() {

return id;

}

public Show getShow() {

return show;

}

public void setShow(Show show) {

this.show = show;

}

 

public Set<Season> getSeasons() {

return seasons;

}

 

public void setSeasons(Set<Season> seasons) {

this.seasons = seasons;

}

}

 

Листинг Season.java

 

package com.profitsoft.model;

 

import java.util.HashSet;

import java.util.Set;

 

public class Season {

private int id;

private String name;

private String dedication;

private Show show;

private Set<Play> plays = new HashSet<Play>();

 

public int getId() {

return id;

}

public void setId(int id) {

this.id = id;

}

public String getName() {

return name;

}

public void setName(String name) {

this.name = name;

}

public String getDedication() {

return dedication;

}

public void setDedication(String dedication) {

this.dedication = dedication;

}

 

public Season(int id, String name, String dedication, Show show) {

super();

this.id = id;

this.name = name;

this.dedication = dedication;

show.addSeason(this);

}

public Season() {

 

}

 

@Override

public boolean equals(Object seasons){

Season season = (Season)seasons;

if (this == seasons){

return true;

}

else if (!(seasons instanceof Season)) {

return false;

}

else if (this.id == season.id && this.dedication == season.dedication &&

this.name == season.name) {

return true;

}

else {

return false;

}

}

 

@Override

public int hashCode() {

return id;

}

public Show getShow() {

return show;

}

public void setShow(Show show) {

this.show = show;

}

public void addPlay(Play play) {

this.plays.add(play);

play.addSeason(this);  

}

public Set<Play> getPlays() {

return plays;

}

public void setPlays(Set<Play> plays) {

this.plays = plays;

}

 

 

}

 

Листинг Show.java

 

package com.profitsoft.model;

 

import java.util.HashSet;

import java.util.Set;

 

public class Show {

private int id;

private int id_play;

private int id_season;

private int price;

private Set<Season> seasons = new HashSet<Season>();

private Set<Play> plays = new HashSet<Play>();

 

public void addSeason(Season season) {

seasons.add(season);

season.setShow(this);

}

 

public void addPlay(Play play) {

plays.add(play);

play.setShow(this);

}

 

public Set<Season> getSeasons() {

return seasons;

}

 

public void setSeasons(Set<Season> seasons) {

this.seasons = seasons;

}

 

public Set<Play> getPlays() {

return plays;

}

 

public void setPlays(Set<Play> plays) {

this.plays = plays;

}

 

public int getId() {

return id;

}

public void setId(int id_show) {

this.id = id_show;

}

public int getId_play() {

return id_play;

}

public void setId_play(int id_play) {

this.id_play = id_play;

}

public int getId_season() {

return id_season;

}

public void setId_season(int id_season) {

this.id_season = id_season;

}

public int getPrice() {

return price;

}

public void setPrice(int price) {

this.price = price;

}

 

public Show(int id_show, int id_play, int id_season, int price) {

super();

this.id = id_show;

this.id_play = id_play;

this.id_season = id_season;

this.price = price;

}

public Show() {

 

}

public boolean equals(Object shows){

Show show = (Show)shows;

if (this == shows){

return true;

}

else if (!(shows instanceof Show)) {

return false;

}

else if (this.id_season == show.id_season && this.id == show.id &&

this.price == show.price && this.id_play == show.id_play) {

return true;

}

else {

return false;

}

}

}

Листинг PlayService.java

 

package com.profitsoft.services;

 

import java.util.List;

 

import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.beans.factory.annotation.Qualifier;

import org.springframework.transaction.annotation.Transactional;

 

import com.profitsoft.DAO.PlayDAO;

import com.profitsoft.model.Play;

@Transactional

public class PlayService{

@Autowired

@Qualifier("PlayDAOImpl")

private PlayDAO playdao;

 

public PlayDAO getPlaydao() {

return playdao;

}

 

public void setPlaydao(PlayDAO playdao) {

this.playdao = playdao;

}

 

public PlayService() {

 

}

 

public void insertPlay(Play play) {

playdao.insertPlay(play);

}

 

public void deletePlay(Play play) {

playdao.deletePlay(play);

}

 

public void updatePlay(Play play) {

playdao.updatePlay(play);

}

 

public Play findPlay(int id) {

return playdao.findPlay(id);

}

 

public List<Play> getPlays() {

return playdao.getPlays();

}

 

 

 

}

 

Листинг SeasonService.java

 

package com.profitsoft.services;

 

import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.beans.factory.annotation.Qualifier;

import org.springframework.transaction.annotation.Transactional;

 

import com.profitsoft.DAO.SeasonDAO;

import com.profitsoft.model.Season;

@Transactional

public class SeasonService {

@Autowired

@Qualifier ("SeasonDAOImpl")

private SeasonDAO seasondao;

 

public SeasonDAO getSeasondao() {

return seasondao;

}

 

public void setSeasondao(SeasonDAO seasondao) {

this.seasondao = seasondao;

}

 

public SeasonService() {

 

}

 

public void insertSeason(Season season) {

seasondao.insertSeason(season);

}

 

public void deleteSeason(Season season) {

seasondao.deleteSeason(season);

}

 

public void updateSeason(Season season, int id) {

seasondao.updateSeason(season, id);

}

 

public Season findSeason(int id){

return seasondao.findSeason(id);

}

}

 

Листинг ShowService.java

 

package com.profitsoft.services;

 

import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.beans.factory.annotation.Qualifier;

import org.springframework.transaction.annotation.Transactional;

 

import com.profitsoft.DAO.ShowDAO;

import com.profitsoft.model.Show;

@Transactional

public class ShowService {

@Autowired

@Qualifier ("ShowDAOImpl")

private ShowDAO showdao;

 

public ShowDAO getShowdao() {

return showdao;

}

 

public void setShowdao(ShowDAO showdao) {

this.showdao = showdao;

}

 

public ShowService() {

 

}

 

public void insertShow(Show show) {

showdao.insertShow(show);

}

 

public void deleteShow(Show show) {

showdao.deleteShow(show); 

}

 

public void updateShow(Show show, int id) {

showdao.updateShow(show, id); 

}

 

public Show findShow(int id) {

return showdao.findShow(id);

}

}


Информация о работе Розробка веб-системи продажі білетів театру