answer.
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
Sindrei [870]
2 years ago
11

Define a method named roleOf that takes the name of an actor as an argument and returns that actor's role. If the actor is not i

n the movie return "Not in this movie.". Ex: roleOf("Jessica Chastain") returns "Murph". Hint: A method may access the object's properties using the keyword this. Ex: this.cast accesses the object's cast property.
Computers and Technology
1 answer:
dusya [7]2 years ago
4 0

Answer:

var movie = {

   // Code will be tested with different actors and movies

   name: "Interstellar",

   director: "Christopher Nolan",

   composer: "Hans Zimmer",

   cast: {

       "Matthew McConaughey": "Cooper",

       "Anne Hathaway": "Brand",

       "Jessica Chastain": "Murph",

       "Matt Damon": "Mann",

       "Mackenzie Foy": "Young Murph"

   },

   roleOf: function (actorName) {

       if (!(actorName in this.cast)) {

           return "Not in this movie.";

       }

       return this.cast[actorName];

   }

};

Explanation:

You might be interested in
Janice is unsure about her future career path she has grown up on her family farm but she is also interested in medicine Janice
KiRa [710]
Janice can actually used both knowledge as an advantage. She can use her background in farming while learning more about medicine. In such a way, she can have a strong advantage in medicinal farming - like learn ways to create good and effective drugs from plants, etc. 
5 0
2 years ago
Type two statements that use rand() to print 2 random integers between (and including) 100 and 149. End with a newline. Ex:
rosijanka [135]

Answer:

#include <stdlib.h>

#include <time.h>

#include<iostream.h>

int main(void) {

   int seedVal = 0;  

   seedVal = 4;

   srand(seedVal);

  /* Solution*/

  cout<<rand() % 149 + 100<<endl;

  cout<<rand() % 149 + 100<<endl;

  return 0;

}

Explanation:

We start with the required include statements to enable use of srand, rand and time functions. I have also added iostream library to use "cout" function.

After that, the seed is initialized using srand(). And then the two rand functions are called with ranges including and between 100 and 149, and printed out.

6 0
2 years ago
Read 2 more answers
Color of seagrass beds on navigational charts? Please quickly
Nadya [2.5K]
Hello! The color of seagrass beds on navigational charts are brown, because they are in shallow areas and it helps you know the locations of them.
5 0
2 years ago
Open "Wireshark", then use the "File" menu and the "Open" command to open the file "Exercise One.pcap". You should see 26 packet
murzikaleks [220]
Idk idk idk idk idk idk
8 0
2 years ago
Suppose we used an Internet Addressing protocol that used 4 bits to encode a single address. How many devices would be supported
Allushta [10]
C. is the answer my guy
8 0
2 years ago
Other questions:
  • Ivan has five workbooks open. He has arranged these files in a specific grouping so he can view them at the same time. In order
    10·1 answer
  • Seneca has just applied conditional formatting and realizes that she has made a mistake. Which action should she take to fix the
    12·1 answer
  • ______ is a certification program that recognizes sustainable building practices and strategies. Question 1 options: A) Brundtla
    10·1 answer
  • Given three dictionaries, associated with the variables, canadian_capitals, mexican_capitals, and us_capitals, that map province
    11·1 answer
  • Information in​ folders, messages,​ memos, proposals,​ emails, graphics, electronic slide​ presentations, and even videos create
    7·1 answer
  • A program is loaded into _________ while it is being processed on the computer and when the program is not running it is stored
    15·2 answers
  • We have an internal webserver, used only for testing purposes, at IP address 5.6.7.8 on our internal corporate network. The pack
    15·1 answer
  • Create a procedure named FindLargest that receives two parameters: a pointer to a signed doubleword array, and a count of the ar
    13·1 answer
  • Suppose that a class named ClassA contains a private nonstatic integer named b, a public nonstatic integer named c, and a public
    14·1 answer
  • Write code that determines the number of full days represented by the number of hours stored in the variable hours and stores th
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!