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
Harlamova29_29 [7]
3 years ago
15

PLEASE HELP ASAP (answer is needed in Java) 70 POINTS

Computers and Technology
1 answer:
8_murik_8 [283]3 years ago
6 0

import java.util.Scanner;

public class MyClass1 {

   public static void main(String args[]) {

     Scanner scan = new Scanner(System.in);

     int smallest = 0, largest = 0, num, count = 0;

     while (true){

         System.out.println("Enter a number (-1 to quit): ");

         num = scan.nextInt();

         if (num == -1){

             System.exit(0);

         }

         else if (num < 0){

             System.out.println("Please enter a positive number!");

         }

         else{

             if (num > largest){

                 largest = num;

                 

             }

             if (num < smallest || count == 0){

                 smallest = num;

                 count++;

             }

             System.out.println("Smallest # so far: "+smallest);

             System.out.println("Largest # so far: "+largest);

         }

     }

   }

}

I hope this helps! If you have any other questions, I'll do my best to answer them.

You might be interested in
Explain why there are fundamental ideas of software engineering that apply to all types of software systems.
olasank [31]

Solution:

Because of all software systems have common quality attributes, including  

Fundamental software engineering activities.  The four basic process activities of specification, development, validation and evolution are organized differently in different development processes.  The software is implemented either by developing a program or programs or by configuring an application system. Such that at they (Software engineer) have been made keeping in mind project development. They hence, apply to all software systems and even non software systems. They are the fundamentals for any kind of project development.

Thus this is the required answer..


5 0
3 years ago
To display the size of your backup file, you can use the Windows program called: Windows Explorer Scan disk Defrag Windows Acces
Nitella [24]
Windows Explorer scan disk
7 0
2 years ago
Assume the existence of a Window class with a function getWidth that returns the width of the window. Define a derived class Win
Pepsi [2]

Answer:

Following are the code in the C++ Programming Language.

//define class and inherited the parent class

class WindowWithBorder : public Window

{

//access modifier

private:

//set integer variable

int borderWidth;

//set integer variable

int windowWidth;

//access modifier

public:

//definition of the constructor that accept an integer type argument

WindowWithBorder(int);

//definition of the function

int getUseableWidth();

};

//set constructor outside the class

WindowWithBorder::WindowWithBorder(int y)

{

//initialization in integer variable from function

windowWidth = getWidth();

//initialization in integer variable from the argument list

borderWidth = y;

}

//set function from outside the class

int WindowWithBorder::getUseableWidth()

{

//return output

return windowWidth - borderWidth;

}

Explanation:

Here we define a class "WindowWithBorder" which inherit their parent class "Window", inside the class.

  • Set two integer data type private variables "borderWidth" and "windowWidth".
  • Write the definition of the "windowWidth" class constructor that accept the integer type argument list.
  • Write the definition of the function "getUseableWidth()" which is integer type.

Then, we define constructor outside the class which accept the integer type argument list "y" inside it.

  • we initialize in the variable "windowWidth" from the function "getWidth()".
  • Initialize in the variable "borderWidth" from the argument of the constructor.

Finally, we define function in which we perform the subtraction of the variable "windowWidth" from the variable "borderWidth" and return it.

5 0
3 years ago
Linda is training to become a certified network design expert and consultant. While researching about the process of cellular ra
mel-nik [20]

Answer:

a. The cell tower forwards the call to the wireless provider's Mobile Telephone Switching Office

Explanation:

When a cell phone user begins to make a call, it is picked up by the cell tower located in the cell in which the cell phone is located and that belongs to the user's wireless provider. The next step in this process is that the cell tower forwards the call to the wireless provider's Mobile Telephone Switching Office.

8 0
3 years ago
Which browser do most web users use and why do you think that it is that way? Make sure you search online for statistics to conf
oksian1 [2.3K]

Answer:

2b2t

Explanation:

2b2t

4 0
3 years ago
Other questions:
  • Brenda wants to finish her presentation with a summary slide . She wants three key messages to appear on each of the photo clips
    6·2 answers
  • 7 features of QBASIC
    6·1 answer
  • ___ are files of related records organized according to logical systems and stored on computer-accessible media.
    5·1 answer
  • The overall purpose of a food guide is________.
    11·1 answer
  • The ________ phase in a project involves documenting lessons learned from the project, so that the experience is useful to other
    13·1 answer
  • How do you add a PDF assignment to google docs and be able to edit it?
    13·1 answer
  • Write the definition of a method min that has two int parameters and returns the smaller.
    9·1 answer
  • What is an example of a memo
    9·1 answer
  • If you notice that a worksheet displays columns A, B, C, E, and F, what happened to column D?
    9·1 answer
  • Years ago when working a helpdesk, the most common question asked, almost daily, was about resetting passwords. What type of kno
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!