Declare a class called country that contains a function called language that prints "English" Define 3 classes and they all inherit from country A brand named Australia A class named Saudi Rewrite the language function and change the implementation of the function so that it prints "Arabic" A class called Spain Rewrite the language function and change the implementation of the function so that it prints "Spanish" Build a Test class to test the code with the Main function and then create objects of the three classes that Workshop of the father's class Then call the language function The result should be as in the picture English Arabic Spanish

CMPTR
3rd Edition
ISBN:9781337681872
Author:PINARD
Publisher:PINARD
Chapter20: Creating A Presentation
Section: Chapter Questions
Problem 11QY
icon
Related questions
Question

IN JAV
1. Declare a class called country that contains a function called language that prints "English"

Define 3 classes and they all inherit from country

A brand named Australia

A class named Saudi Rewrite the language function and change the implementation of the function so that it prints "Arabic"

A class called Spain Rewrite the language function and change the implementation of the function so that it prints "Spanish"

Build a Test class to test the code with the Main function and then create objects of the three classes that

Workshop of the father's class

Then call the language function

The result should be as in the picture

English

Arabic

Spanish

English
Arabic
Spanish
Transcribed Image Text:English Arabic Spanish
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Data members
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
CMPTR
CMPTR
Computer Science
ISBN:
9781337681872
Author:
PINARD
Publisher:
Cengage