Question:
Hi I am just learning how to code using java, but I need help.?
ska_ter3
2010-10-24 19:15:57 UTC
I need to complete an exercise but I don't know where to start. Can anyone help me with this exercise?

Exercise 1: Analyzing a Problem Domain

This exercise is based on a small case study. You will identify the objects,
their attributes and operations involved in the system domain.

Preparation

Read the following case study, and then model the system by choosing
objects and their attributes and operations.

Case Study

A soccer league has many players. Each year there are three seasons and
the league puts together teams for each season. Each team is comprised of
15 players. The goals scored by each player during each season are
tracked. The games played between the teams, their final scores, and each
team’s standings based on its won and lost games are tracked.

Task – Performing an Analysis

Your task is to produce an object-oriented analysis for a Java technology
application that tracks soccer scores. The program should track:

● The list of players on each team
● The number of goals that each player scores
● The games played during a season, including the teams that play
each other, and the final score
The application should be able to generate statistics for teams, players,
and seasons.

To finalize the analysis, complete the following steps:
1. Create a list of the potential objects.
2. Apply the rules in this module to decide if all your objects are valid.
3. Create a list of attributes and operations for each of your objects.
Three answers:
2010-10-24 19:27:56 UTC
Objects are instances of classes.



Classes are just the nouns from the problem: league, player, season, game, team, and goal.



Goals occur both by specific players, and specific games, so these are attributes of the goal.



Games occur in a specific season, so "season" is an attribute of games, as is the team playing in them. Ideally games would include a list of players rather than teams, since players can change teams, and not play in particular games even if they're on the team, but that's unnecessary for this model.



All of these other classes (player, season, game, team, goal) are contained within the league, so they're attributes of league, and league should manage them, have methods for getting the list of seasons. Try to put methods in the classes they most directly relate to. Not all of them should go into league directly.
2016-03-13 02:02:16 UTC
When you click on the checkbox the actionPerformed method is being called instead of the itemStateChanged method. One fix would be to move the logic for toppings all into the itemStateChanged method.
?
2010-10-24 19:16:42 UTC
drop the course. CSCI sucks


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...