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
oksano4ka [1.4K]
3 years ago
10

Given two variables, is Empty of type boolean, indicating whether a class roster is empty or not, and number Of Credits of type

int, containing the number of credits for a class, write an expression that evaluates to true if the class roster is empty or the class is exactly three credits.
Computers and Technology
1 answer:
Alex_Xolod [135]3 years ago
4 0

Answer:

     if(isEmpty || numOfCredits==3){

         

     }

Explanation:

Consider a complete java program below that prompts user for  number of credits and also asks if class roster is empty or not

<em>import java.util.Scanner;</em>

<em>public class num13 {</em>

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

<em>        boolean isEmpty = false;</em>

<em>        Scanner in = new Scanner(System.in);</em>

<em>        System.out.println("Is class Rooster Empty? Yes or No");</em>

<em>        String ans = in.next();</em>

<em>        if(ans.equalsIgnoreCase("yes")){</em>

<em>            isEmpty = true;</em>

<em>        }</em>

<em>        else isEmpty =false;</em>

<em>        System.out.println("Enter number of credits");</em>

<em>      int numOfCredits = in.nextInt();</em>

<em>      if(isEmpty||numOfCredits==3){</em>

<em>          System.out.println("True");</em>

<em>      }</em>

<em>      else {</em>

<em>          System.out.println("Not true");</em>

<em>      }</em>

<em>    }</em>

<em>}</em>

You might be interested in
What is the most popular social networking service to date?
Fofino [41]
I think Face book hope that helped XD
6 0
3 years ago
Read 2 more answers
What is graphical symbols​
evablogger [386]

Explanation:

A graphical symbol is a visually perceptible figure with a particular meaning used to transmit information independently of language.

if this helps you please mark me brainliest

have a nice day :)

6 0
3 years ago
What device makes it possible for multiple customers to share one address
Galina-37 [17]
A=NAT is correct I think
6 0
3 years ago
What is a commonly publicized password sql injection string?
aleksley [76]
The strings "or 1=1" and ""or ''=''"  can be commonly used to trick an SQL WHERE clause into becoming true.

So if you specify <span>' or ''=' as a password, you can log in if the query string would be:

</span><span>select username,pass from users where username='you' and password='' or ''='<span>' limit 0,1;</span></span>
7 0
4 years ago
Which shortcut brings up the Print screen?
sashaice [31]

The answer is alt + prt sc

5 0
3 years ago
Read 2 more answers
Other questions:
  • You have been tasked with finding the routers that have been installed between two networks. what utility would you use to provi
    5·1 answer
  • R7.1 Carry out the following tasks with an array:
    7·1 answer
  • Which one of the following provides an authentication mechanism that would be appropriate for pairing with a password to achieve
    13·1 answer
  • Which type of exception would be detected if you used the conversion command Convert.ToDecimal to try to convert an ampersand?
    14·1 answer
  • Given the following code:
    7·1 answer
  • Signals that can travel in only one direction on a medium are referred to as what type of signal?
    12·1 answer
  • How do you delete an credit card off an iPhone 7
    5·1 answer
  • What is “GoF” and how does it relate to design patterns?
    7·1 answer
  • What is the first step in finding a solution to a problem? Choose a solution. Think of options to solve the problem. Try the sol
    6·1 answer
  • What would be the most constructive response
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!