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]
2 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]2 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
A new product was introduced in 2003, which functions as both an identification device and a medium of communication. It uses in
Svetllana [295]

Answer:

nTag

Explanation:

nTag describe -Providing information on freight limitations-Preparing documentation-Packing exhibit materials-Helping to ensure that shipments arrive on time.

5 0
3 years ago
The World Health Organization decided that addiction to video games is considered a mental health disorder. Do you agree or disa
Blababa [14]

Answer:

I disagree and I will tell you why because there was study based on video games and seniors and the theory was that they play games to keep there minds active. I will give you an example let's say you were in a situation and you learned how to make or create something from playing video games, in closeur video games can help us in problems

8 0
3 years ago
Which of the following is NOT one of the four steps preparing for sales forecast ?
ehidna [41]
Can you post the answers plz
4 0
3 years ago
Write 10 steps to make your presentation more effective
Over [174]
For me the some steps I use not 10 steps sorry are I always go through the slide and think what I am talking about. You have to understand what you are talking about and be clear and persuasive. Never look at the presentation. Memorize key phrases and keep your eyes at your audience. make each of your slides colorful so viewers will look at your actually slide.
4 0
3 years ago
Which function prompts the user to enter information?
Rzqust [24]

Answer:

input() prompts the user to enter information

6 0
3 years ago
Read 2 more answers
Other questions:
  • Pendant Publishing edits multi-volume manuscripts for many authors. For each volume, they want a label that contains the author'
    14·1 answer
  • PASSAGE: The picnic had been scheduled for weeks in advance. The Morris family was looking forward to some fun and relaxation wi
    12·1 answer
  • 52.
    11·1 answer
  • 110011 * 1111 binary calculation
    15·1 answer
  • Why is it important for software developers to study Human-Computer Interaction? to make sure a user interface is easy to use, w
    10·2 answers
  • How do the principles behind the Agile Manifesto suggest approaching architecture?A. Architecture emergesB. Architecture is not
    10·1 answer
  • A 9-year old male castrated Westie presents on emergency after being rescued from a house fire. On presentation, the dog has a r
    9·1 answer
  • Write a program in qbasic to accept a character and check it is vowel or consonant​
    14·1 answer
  • Please answer me <br> in Assignment - Algorithms
    10·1 answer
  • Cho lược đồ CSDL “Quản lý BÁN HÀNG” có các bảng như bên dưới. (Thuộc tính in đậm và
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!