Execute Answer page here
(Source code for answers here)Assume, there is a little league baseball league that keeps player statistics. There is a table named LLteam that holds the team data; a table named players that holds individual player demographic information; and a table named game_perf that records the events associated with a player's game performance. The data structures for these tables are shown below:
LL_team | player | game_perf |
team_id int IDENTITY (1,1), team_name varchar(30), coach_first_name varchar(25), coach_last_name varchar(25), coach_home_phone varchar(10), coach_cell1 varchar(10), coach_cell2 varchar(10), PRIMARY KEY (team_id) |
player_id int IDENTITY (1,1), first_name varchar(25), last_name varchar(25), home_phone varchar(10), cell1 varchar(10), cell2 varchar(10), team_id int, age int, PRIMARY KEY (player_id) |
game_data_id int IDENTITY (1,1), player_id int NOT NULL, opponent_id int, game_date char(6), innings_played int, at_bats int, hits int, walks int, fielding_errors int, innings_pitched numeric (4,1), hits_allowed int walks_allowed int, winning_or_losing_pitcher char(1), PRIMARY KEY (game_data_id) |
1. (40 points) Write the first three passes for a MODIFY program (named "fix.asp") that allows the league officials to modify a player's game performance statistics (i.e., the contents of game_perf). Specifically:
<a href='fix.asp?token=2&tid=[value of the team_id]'>[value of the team_name]</a>
<a href='fix.asp?token=3&pid=[value of the player_id]'>[last_name of the player], [first_name of the player]</a>:
<a href='fix.asp?token=4&gid=[value of game_data_id]'>[game_date]</a>:
2. (60 points) Write the two subs for passes 4 and 5 of fix.asp that allows:
In textboxes place the current values from the database for:
(a) innings_played (in a one byte textbox)
(b) at_bats (in a one byte textbox)
(c) hits (in a one byte textbox)
(d) walks (in a one byte textbox)
(e) fielding_errors (in a one byte textbox)
(f) innings_pitched (in a two byte textbox)
(g) hits_allowed (in a two byte textbox)
(h) walks_allowed (in a two byte textbox)
(i) winning_or_losing_pitcher (in a one byte textbox, Ask the user to enter "W" or "L" or "N" (No Decision)
and a submit button
Do NOT edit the data. Do NOT use parameters or transaction control. Do NOT write the "main" routine.