Last lab also for tommorrow.
Lab Exercise 7.3 Instructions: Follow these instructions exactly and in the order listed.
- Create a folder with YourLastNameFirstInitialLE73.
- Inside of that folder create 3 more folders: In DrJava create a project folder (Creating Projects in DrJava.pdf ) asYourLastNameFirstInitialLE73.
- classes
- src
- proTeams (this folder stores the Football class and can be within the src folder)
- Add the folders to the project (see link in #3 above).
- Add a new file to the proTeams folder and call it Football (see link in #3 above).
- In the program with the main(), import the Football class. The import statement will look like this: importnameOfFolder.NameOfProgram;
- In the Football program
- code a package statement as the very first line:package nameOfFolder;
- code 2 fields (class level variables): one to store the city and the other the team's name;
- code 2 overloaded constructors: onethat is parameterless with an empty method body, and the other that will accept 2 arguments through its parameter list. Use the parameter variables to populate the 2 fields (global variables) with the same name;
- code individual set methods that prompt the user for the city and the team's name;
- code individual get methods that return each set method's variable.
- In the main()
- code a Football object using the empty constructor;
- use the object to call the methods from the Football class in the proper sequence to produce what is shown in the sample output;
- code another Football object by sending to it the team name and the city (look at which constructor you'll be using);
- follow the spacing and line advances in the attached sample output.
- Don't forget to end the main() with an exit statement.