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
emmainna [20.7K]
3 years ago
6

Consider that the following variables have been declared: int David_Tennant; double Matt_Smith; Which of the following statement

s are valid. Select all that apply.
a. Integer tenth = David_Tennant;
b. (double)David_Tennant = Matt_Smith;
c. Matt_Smith = double(David_Tennant;)
d. Matt_Smith = (double)David_Tennant;
e. Matt_Smith = David_Tennant;



Double eleventh = 11.50;
David_Tennant = eleventh.intValue();
Computers and Technology
1 answer:
earnstyle [38]3 years ago
8 0

Answer:

Double eleventh = 11.50;

David_Tennant = eleventh.intValue();

Explanation:

These two statements are correct. Method intValue() converts Integer to int which is is called unboxing. In this case intValue() method converting Integert part of eleventh variable then storing it in int variable David_Tennant. Output will be 11.

You might be interested in
Write a program that keeps track of a simple inventory for a store. While there are still items left in the inventory, ask the u
MissTica

Answer:no

Explanation:

3 0
3 years ago
Read 2 more answers
Where should you look for most objective and unbaised information
jekas [21]
Google, would be the best because of all of the different site, hope this helps!
: )
8 0
3 years ago
When computer network are joined together they form a bigger network called the​
Airida [17]

Answer:

A WAN can be one large network or can consist of two or more lans connected together. The Internet is the world's largest wan.

Explanation:

8 0
3 years ago
Given: an int variable k, an int array current Members that has been declared and initialized, an int variable memberID that has
Alekssandra [29.7K]

Answer:

The c++ program is given below. Nothing is displayed as per the question.

#include <iostream>

using namespace std;

int main() {    

   // declaration and initialization of integer variables

   int k, memberID = 12, nMembers=5;

   bool isAMember;    

   // declaration and initialization of integer array

   int currentMembers[] = {12, 34, 56, 78, 90};    

   for(k=0; k<nMembers; k++)

   {

       if(memberID == currentMembers[k])

       {

           // when member is found in the array, the loop is exited using break

           isAMember = true;

           break;

       }

       else

           isAMember = false;

   }    

   return 0;

}

Explanation:

The program begins with declaration and initialization of integer variables and followed by initialization of the array holding the id of all the members.

The Boolean variable is declared but not initialized.

int k, memberID = 12, nMembers=5;

bool isAMember;

int currentMembers[] = {12, 34, 56, 78, 90};

After this, the array holding the id of the members is searched for the given member id. This is done using  a for loop and a if else statement inside the loop.

If the member id is present in the array, the variable isAMember is initialized to true otherwise it is assigned false.

When the variable isAMember is initialized to true, the break statement is used to exit from the loop.

for(k=0; k<nMembers; k++)

   {

       if(memberID == currentMembers[k])

       {

           isAMember = true;

           break;

       }

       else

           isAMember = false;

 }

The break is used since other values of id in the array will not match the given member id and the variable, isAMember will be initialized to false even if the given member id is present in the array. Hence, it is mandatory to exit the loop once the given member id is found in the array.

This program can be tested for different values of the id of the members and different sizes of the array.

4 0
3 years ago
Dennis is driving a car with his family onboard. His children are sitting on the backseat. They have a tablet and want to watch
Mice21 [21]

Answer:

A and D could work

Explanation:

they do basically does the same thing!!

8 0
3 years ago
Other questions:
  • Conversion of a continuous stream of sound into a series of ones and zeroes that can be interpreted by computers results in
    12·1 answer
  • Explain briefly why every person in the world is not connected to the Internet.
    9·1 answer
  • What is the Matlab command to create a column vector with 11 equally spaced elements, whose first element is 2 and whose last is
    8·1 answer
  • Rewrite each condition below in valid Java syntax (give a boolean expression): a. x &gt; y &gt; z b. x and y are both less than
    7·1 answer
  • Write a program that simulates flipping a coin to make decisions. The input is how many decisions are needed, and the output is
    14·1 answer
  • What is an avenue in a Karel world?
    6·2 answers
  • When you use the 3 bits 100 what color will it produce?<br><br> Computer Science
    11·1 answer
  • Miley met up with a bunch of her college friends after several years. She told them that she works for the sound department of a
    5·1 answer
  • Explain different types of networking-based attacks
    5·1 answer
  • How can you remove background noise from a video?
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!