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
anyanavicka [17]
4 years ago
12

Insert the missing code in the following code fragment. This fragment is intended to implement a method to assign a value to an

instance variable.
public class Vehicle
{
private String model;
private double rpm;
. . .
_______
{
model = modelName;
}
}
a) public void setModel(String modelName)
b) public void getModel()
c) public String getModel()
d) public String setModel(String modelName)
Computers and Technology
1 answer:
Viktor [21]4 years ago
5 0

Answer:

a) public void setModel(String modelName)

Explanation:

Writing methods for a class in java requires the optional access modifier (public, private or protected) followed by the return type (void, int, String etc), this is followed by the method's name and parameter list.

In the options given in the question above, only A and D come close to describing the method however option A is correct because this method is not expected to return a value when called hence return type is void

You might be interested in
In programming, what is an integer number?
Goshia [24]
The answer is a number without a decimal.
7 0
3 years ago
Read 2 more answers
Array elements must be ________ before a binary search can be performed.
Sladkaya [172]
In order.
You have to be able to see if its on the left or right side of the midpoint
7 0
3 years ago
In the 21st century organization we will see:
kykrilka [37]

Answer: All of the above

Explanation: As the technology is getting improved and advanced time to time, it will put a huge impact on various sections of organization.

The advancement in the IT infrastructures will be seen by the improvement in the software,networks, data centers, hardware etc and their functioning.This will lead increase the focus of the technology towards the IT infrastructure.

Security is the feature that requires to be developed throughout the time as hacker and attackers come up with various attacks and other malicious activity to steal the confidential data and information .Thus security constantly needs to be improved and focused which will continue to happen in 21st century.

Business of organizations are becoming online and this will tend the organizations to become more indulged online business or e-business in future as it provides more benefits and vast coverage .Thus, all the options are correct.

5 0
4 years ago
Introduction to graphic design please help! Define the four terms: design ,art,decoration , and visual literacy. Describe how th
erastovalidia [21]
Graphic design involves activities , usually done on the computer in which pictures, graphs, text and other elements are combined as a edit to books, magazines, advertisements. 
Activities which are part from this job are:
Design: the creation of ideas, plans and finally creation of object, pictures,...
Art: expressing the imagination through different ways of expression/ 
Decoration: adding something to the graphic design in order to look and act nicer
Visual literacy: the ability to understand existing trends and to learn new ones
8 0
4 years ago
Convert A4B from hexadecimal to binary. Show your work.
Rama09 [41]

Answer:

The answer is A4B₁₆ =  2635₁₀ =  101001001011₂

Explanation:

To convert from hexadecimal base system to binary base system, first you can do an intermediate conversion from hexadecimal to decimal using this formula:

where position of the x₁ is the rightmost digit of the number and the equivalents hexadecimal numbers to decimal:

  • A = 10.
  • B = 11.
  • C = 12.
  • D = 13.
  • E = 14.
  • F = 15.

A4B₁₆ = A*16²+4*16¹+B*16⁰ = 2560 + 64 + 11 = 2635₁₀

Now, you have the number transformed from hexadecimal to decimal. To convert the decimal number 2635 to binary: Divide the number repeatedly by 2, keeping track of each remainder, until we get a quotient that is equal to 0:

2635 ÷ 2 = 1317 + 1;

1317 ÷ 2 = 658 + 1;

658 ÷ 2 = 329 + 0;

329 ÷ 2 = 164 + 1;

164 ÷ 2 = 82 + 0;

82 ÷ 2 = 41 + 0;

41 ÷ 2 = 20 + 1;

20 ÷ 2 = 10 + 0;

10 ÷ 2 = 5 + 0;

5 ÷ 2 = 2 + 1;

2 ÷ 2 = 1 + 0;

1 ÷ 2 = 0 + 1;

Now, construct the integer part base 2 representation, by taking the remainders starting from the bottom of the list:

2635₁₀ =  101001001011₂

3 0
3 years ago
Other questions:
  • Respond to the following in a paragraph of no less than 125 words. What is the purpose of netiquette guidelines?
    10·1 answer
  • Name format Many documents use a specific format for a person's name. Write a program whose input is: firstName middleName lastN
    14·2 answers
  • With ________, website programmers can import data from other sources to create new functions and features that we associate wit
    14·1 answer
  • Explaine possibility of malware bundled into downloads
    13·1 answer
  • Convert 4.5 strides to girth
    10·1 answer
  • Identify the characteristics of logic problems.select all that apply
    5·1 answer
  • What kind of music you guys play
    5·2 answers
  • Tools used to type text on Ms -paint​
    10·1 answer
  • Anyone tell my answer.
    15·1 answer
  • How does the technology affect you daily living? Give situations where you use technology and how it helped you.​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!