1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Sergio [31]
4 years ago
12

Define a new object in variable sculptor that has properties "name" storing "Michelangelo"; "artworks" storing "David", "Moses"

and "Bacchus"; "bornDate" storing "March 6, 1475"; and "diedDate" storing "February 18, 1564".
Computers and Technology
1 answer:
Talja [164]4 years ago
6 0

Answer:

       String [] artworks = {"David","Moses","Bacchus"};

       Sculptor sculptor = new Sculptor("Michaelangelo",artworks,

               "March 6, 1475","February 18, 1564");

Explanation:

  • To solve this problem effectively;
  • Create a class (Java is used in this case) with fields for name, artworks(an array of string), bornDate and diedDate.
  • Create a constructor to initialize this fields
  • In a seperate class SculptorTest, within the main method create an array of String artworks and initialize to {"David","Moses","Bacchus"};
  • Create a new object of the class with the line of code given in the answer section.
  • See code for complete class definition below:

<em>public class Sculptor {</em>

<em>    private String name;</em>

<em>    private String [] artworks;</em>

<em>    private String bornDate;</em>

<em>    private String diedDate;</em>

<em>    public Sculptor(String name, String[] artworks, String bornDate, String diedDate) {</em>

<em>        this.name = name;</em>

<em>        this.artworks = artworks;</em>

<em>        this.bornDate = bornDate;</em>

<em>        this.diedDate = diedDate;</em>

<em>    }</em>

<em>}</em>

<em>//Test Class with a main method</em>

<em>class SculptorTest{</em>

<em>    public static void main(String[] args) {</em>

<em>        String [] artworks = {"David","Moses","Bacchus"};</em>

<em>        Sculptor sculptor = new Sculptor("Michaelangelo",artworks,</em>

<em>                "March 6, 1475","February 18, 1564");</em>

<em>    }</em>

<em>}</em>

You might be interested in
Print 1 to 100 in visual basic .6
FrozenT [24]

Answer:

make ( next i ) after ( debug. print ) ​

Explanation:

Its definitely, the above answer. DIM is used for defining a variable which is an integer here. Then the for loop has been used and this will run for 1 to 100 thus as we move under debug,print I. But Next I should come after. Hence first it will be Debug,print I and then the next I .

And hence, the above answer.

The full program will be:

SUB MAIN()

DIM I AS INTEGER

FOR I = 1 TO 100 STEP 1

DEBUG.PRINT I

NEXT I

END SUB

6 0
3 years ago
In the program below, which two variables have the same scope?
bagirrra123 [75]

Answer:

rhymeWord

Explanation:

correct answer edge 2020

3 0
4 years ago
Read 2 more answers
Someone learn me more American Sign Language (ASL). Please.
sveticcg [70]

Answer:

Ok I will

Explanation:

3 0
4 years ago
Do you agree that technology is always at the advantageous side wherein it only results in good things?
Crazy boy [7]

Answer:

No, think about mass surveillance in China (and in USA!), and the "social credit" system.

4 0
3 years ago
Which of the following is not a danger of blogging
Ainat [17]
D. staying connected with an old friend.

4 0
3 years ago
Read 2 more answers
Other questions:
  • Trish has bought a new computer that she plans to start working on after a week. Since Trish has not used computers in the past,
    10·1 answer
  • Two positive outcomes generally associated with modern computing are greater _____.
    12·2 answers
  • 4. A friend knows you are taking a technology class in college and asks you how a hard drive works. In your own words, describe
    6·1 answer
  • Crack the secret message: Crrp, Crrp, Crrp Zh’uh jrlqj wr wkh prrq. Li brx zdqw wr wdnh d wuls, Folpe derdug pb urfnhw vkls. (hi
    7·1 answer
  • When you see this traffic signal is turned on, you may _____________________.
    5·2 answers
  • Which component, located on the motherboard, carries out all the instructions provided by computer programs? ram?
    5·1 answer
  • What would this look like if you were to write the pseudocode but for c++?
    5·1 answer
  • Which type of malware prevents you from accessing files stored on your computer?
    10·2 answers
  • You add a filter by condition, and set the condition to [weight]&gt;50. how will this affect your data?
    5·1 answer
  • A service _ consists of overhead wires and devices that connect the power company power lines to a residence.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!