C design an application that declares an array of 10

This preview shows page 19 - 24 out of 266 pages.

c. Design an application that declares an array of 10 Pizzas. Prompt the user for data for each
d. Design an application that declares an array of 10 Pizzaobjects. Prompt the user for a toppi
8.Complete the following tasks:a. Design a class named BaseballGamethat has fields for two team names and a final score f
- awayTea mName: string - homeTea mScore: num - awayTea mScore: num +setHom eTeamNa me(home Name : string) : void +setAwa yTeamNa me(away Name : string) : void +setHom eTeamSc ore(sco re : num) : void +setAwa yTeamSc ore(sco re : num) : void +getHom eTeamNa me() : string +getAwa yTeamNa me() : string +getHom eTeamSc ore() : num +getAwa yTeamSc ore() : num
Pseudocode: class BaseballGame Declarations private string homeTeamName private string awayTeamName private num homeTeamScore private num awayTeamScore public void setHomeTeamName(string homeName) homeTeamName = homeName return public void setAwayTeamName(string awayName) awayTeamName = awayName return public void setHomeTeamScore(num score) homeTeamScore = score return public void setAwayTeamScore(num score) awayTeamScore = score return public string getHomeTeamName() return homeTeamName public string getAwayTeamName() return awayTeamName public num getHomeTeamScore() return homeTeamScore public num getAwayTeamScore() return awayTeamScore endClass Pseudocode:

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture