Java Programming
Java Programming
9th Edition
ISBN: 9780357616635
Author: Joyce Farrell
Publisher: CENGAGE L
Question
Book Icon
Chapter 4, Problem 5PE
Program Plan Intro

a.

Display the school name, sport name and team name

Program plan:

Filename: “Team.java”

  • Define the “Team” class.
    • Declare the required variables.
    • Define the parameterized constructor.
      • Set the values.
    • Define “getSchoolName” method
      • Return the school name.
    • Define “getSportName” method
      • Return the sport name.
    • Define “getTeamName” method
      • Return the team name.

Filename: “TestTeam.java”

  • Define the “TestTeam” class.
    • Define the main method.
      • Create the objects for “Team” class with different parameters.
      • Display the results.

Program Plan Intro

b.

Display the game details

Program plan:

Filename: “Team.java”

  • Define the “Team” class.
    • Declare the required variables.
    • Define the parameterized constructor.
      • Set the values.
    • Define “getSchoolName” method
      • Return the school name.
    • Define “getSportName” method
      • Return the sport name.
    • Define “getTeamName” method
      • Return the team name.

Filename: “Game.java”

  • Define the “Game” class.
    • Declare the required variables.
    • Define the parameterized constructor.
      • Set the values.

Filename: “TestTeam.java”

  • Define the “TestTeam” class.
    • Define the main method.
      • Create the objects for “Team” class with different parameters.
      • Create an object for “Game” class.
      • Display the results.

Blurred answer
Students have asked these similar questions
Q4: Consider the following MAILORDER relational schema describing the data for a mail order company. (Choose five only). PARTS(Pno, Pname, Qoh, Price, Olevel) CUSTOMERS(Cno, Cname, Street, Zip, Phone) EMPLOYEES(Eno, Ename, Zip, Hdate) ZIP CODES(Zip, City) ORDERS(Ono, Cno, Eno, Received, Shipped) ODETAILS(Ono, Pno, Qty) (10 Marks) I want a detailed explanation to understand the mechanism how it is Qoh stands for quantity on hand: the other attribute names are self-explanatory. Specify and execute the following queries using the RA interpreter on the MAILORDER database schema. a. Retrieve the names of parts that cost less than $20.00. b. Retrieve the names and cities of employees who have taken orders for parts costing more than $50.00. c. Retrieve the pairs of customer number values of customers who live in the same ZIP Code. d. Retrieve the names of customers who have ordered parts from employees living in Wichita. e. Retrieve the names of customers who have ordered parts costing less…
Q4: Consider the following MAILORDER relational schema describing the data for a mail order company. (Choose five only). (10 Marks) PARTS(Pno, Pname, Qoh, Price, Olevel) CUSTOMERS(Cno, Cname, Street, Zip, Phone) EMPLOYEES(Eno, Ename, Zip, Hdate) ZIP CODES(Zip, City) ORDERS(Ono, Cno, Eno, Received, Shipped) ODETAILS(Ono, Pno, Qty) Qoh stands for quantity on hand: the other attribute names are self-explanatory. Specify and execute the following queries using the RA interpreter on the MAILORDER database schema. a. Retrieve the names of parts that cost less than $20.00. b. Retrieve the names and cities of employees who have taken orders for parts costing more than $50.00. c. Retrieve the pairs of customer number values of customers who live in the same ZIP Code. d. Retrieve the names of customers who have ordered parts from employees living in Wichita. e. Retrieve the names of customers who have ordered parts costing less than$20.00. f. Retrieve the names of customers who have not placed…
ut da Q4: Consider the LIBRARY relational database schema shown in Figure below a. Edit Author_name to new variable name where previous surname was 'Al - Wazny'. Update book_Authors set Author_name = 'alsaadi' where Author_name = 'Al - Wazny' b. Change data type of Phone to string instead of numbers. عرفنه شنو الحل BOOK Book id Title Publisher_name BOOK AUTHORS Book id Author_name PUBLISHER Name Address Phone e u al b are rage c. Add two Publishers Company existed in UK. insert into publisher(name, address, phone) value('ali','uk',78547889), ('karrar', 'uk', 78547889) d. Remove all books author when author name contains second character 'D' and ending by character 'i'. es inf rmar nce 1 tic عرفته شنو الحل e. Add one book as variables data? عرفته شنو الحل
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,