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
Nat2105 [25]
3 years ago
6

What is wrong with the following code? publicstatic char grade(int score) { if (score >= 9) { return 'A'; } else if (score &g

t;= 8) { return 'B'; } else if (score >= 6) { return 'C'; } else if (score > 4) { return 'D'; } else if (score < 4) { return 'F'; } }
Computers and Technology
1 answer:
UkoKoshka [18]3 years ago
6 0

Answer:

c) No return statement for all possible logic paths

You might be interested in
What are data structures and algorithms? Why are they important to software developer?
Elden [556K]

Explanation:

Data structure is a way of gathering and organizing the data in such a way that we can perform operation on the data very efficiently.There are different types of data structures such as :-

  1. Arrays
  2. Linked list
  3. Stacks
  4. Queues
  5. Trees
  6. Graphs

These are the basic data structures.

Algorithm:-It is a finite set of instructions written to accomplish a certain task.An algorithm's performance is measured on the basis of two properties:-

  1. Time complexity.
  2. Space complexity.

Software developers need to know data structures and algorithms because all the computers rely on data structures and algorithms so if you know data structures and algorithms better you will know the computer better.

6 0
3 years ago
What is a traffic controller?what are its functions?
olchik [2.2K]

Answer:

A traffic controller is basically a system design to regulate traffic in a controlled manner with a set of traffic rules to follow so as to ensure public safety .

The main functions of a traffic light controller are listed below:

  • To direct  and regulate vehicular and pedestrian traffic
  • To ensure safety of construction workers, emergency response team and public in general in order to avoid accidents
  • These also uses CCTV and other monitoring system to manage flow of traffic and suggestion concerned with traffic congestion. These are provided by local or state authorities.
  • To ensure smooth traffic flow in order to save time and chaos.

4 0
3 years ago
Constructors have the same name as the ____.1. data members2. member methods3. class4. package
Svetradugi [14.3K]

Answer:

(3) option is the correct answer.

Explanation:

Constructors need to initialize the object in the memory. "To declare the Constructor for any class the user needs to specify the constructor name which is already the class name". This is an object-oriented language guideline.

It is because the object is created by the name of the class and Constructor is used to allocate the memory for the object. hence Constructor is created by the name of the class.

For example--

                       class test //class name test

                      {

                               test() //created a constructor with class name "test"

                               {

                               }

                      }

In the above example class name and constructor name are same if it not then it will gives a error.

Another option is not valid for the answer to the above problem because-

  • Option 1 is wrong because, for any class, the data member is a type of variable, which is used to store the data and is accessed with the help of an object.
  • Option 2 is wrong because, for any class, member function is a type of user function used to accessed the variable and expressions.
  • Option 4 is wrong because, package is a set used to hold classes and interfaces.

8 0
3 years ago
A technician receives an invalid certificate error when visiting a website with port 443 enabled. Other computers on the same LA
amm1812

Answer:

Option (A) is the right answer.

Explanation:

According to the scenario, the user system is giving the error of invalid certificate while other users on the same network do not report any error, which means that there is some problem in a particular system.

Date and time can also be one of the main cause of this error because wrong date and time creates problem in surfing many websites by giving certificate error.

Hence the most appropriate answer is option (A).

While other option are wrong because of the following reasons:

  • UEFI boot mode is mainly used in booting the operating system and has no connection with network.
  • Logon time is also wrong because if the problem is with the login server, it can not give certificate error.
  • User access control is also not correct because it is used to control the access of the user.
7 0
3 years ago
Advantages and disadvantages of algorithm​
Maru [420]

Answer:

\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\

Explanation:

It is easy to understand. Algorithm is a step-wise representation of a solution to a given problem. In Algorithm the problem is broken down into smaller pieces or steps hence, it is easier for the programmer to convert it into an actual program

Algorithms are time-consuming. Big tasks are difficult to put in algorithms. Difficult to show branching and looping in algorithms. Understanding complex logic through algorithms can be very difficult.

5 0
2 years ago
Other questions:
  • Given three floating-point numbers x, y, and z, output x to the power of y, x to the power of (y to the power of z), the absolut
    9·1 answer
  • This is not school related in anyway but. I used to play this videogame on my computer years ago, but i cannot remember the name
    13·2 answers
  • Several days a week, usually between 8:00 a.m. and 9:00 a.m., users complain of MWI problems. Some have new messages, but their
    11·1 answer
  • Someone who is young, lacks funds, and really wants to gain technical skills while serving his or her nation should consider
    8·1 answer
  • For which type of long-distance call do you need to tell the operator the name of the person to whom you wish to speak?
    10·1 answer
  • What type of memory or storage device is prone to losing data if the power goes out?
    5·1 answer
  • Complete the following sentence.
    7·1 answer
  • Enthusiasm codehs 7.6.4 Write a function called add_enthusiasm that takes a string and returns that string in all uppercase with
    15·1 answer
  • Need help finding the totals and with the empty spots
    9·1 answer
  • What is the shortcut key to create a new desktop ​
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!