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
iren2701 [21]
2 years ago
11

or a given integer n > 1, the smallest integer d > 1 that divides n is a prime factor. We can find the prime factorization

of n if we find d and then replace n by the quotient of n divided by d, repeating this until n becomes 1. Write a java program that uses a stack to print the prime factors of a positive integer in descending order. Fo
Computers and Technology
1 answer:
Kobotan [32]2 years ago
5 0

Using the knowledge in computational language in JAVA it is possible to write a code that organizes the values ​​in descending order according to the division made.

<h3>Writing the code in JAVA we have:</h3>

<em>ArrayStackADT.java</em>

<em>package L4.num1;</em>

<em>public interface ArrayStackADT<T></em>

<em>{</em>

<em>void initializeStack();</em>

<em>boolean isEmptyStack();</em>

<em>boolean isFullStack();</em>

<em>void push(T item) throws StackOverflowException;</em>

<em>T peek() throws StackUnderflowException;</em>

<em>void pop() throws StackUnderflowException ;</em>

<em>}</em>

<em>StackOverflowException.java</em>

<em>package L4.num1;</em>

<em>public class StackOverflowException extends StackException</em>

<em>{</em>

<em>public StackOverflowException()</em>

<em>{</em>

<em>super("Stack Overflow");</em>

<em>}</em>

<em>public StackOverflowException(String message)</em>

<em>{</em>

<em>super(message);</em>

<em>}</em>

<em>}</em>

<em>StackException.java</em>

<em>package L4.num1;</em>

<em>public class StackException extends RuntimeException</em>

<em>{</em>

<em>public StackException(String message)</em>

<em>{</em>

<em>super(message);</em>

<em>}</em>

<em>}</em>

<em>StackUnderflowException.java</em>

<em>package L4.num1;</em>

<em>public class StackUnderflowException extends StackException</em>

<em>{</em>

<em>public StackUnderflowException()</em>

<em>{</em>

<em>super("Stack Underflow");</em>

<em>}</em>

<em>public StackUnderflowException(String message)</em>

<em>{</em>

<em>super(message);</em>

<em>}</em>

<em>}</em>

See more about JAVA at brainly.com/question/12978370

#SPJ1

You might be interested in
Help please not trying to fail
deff fn [24]

Answer:

B. Everywhere CFCI is not

8 0
3 years ago
Jordan has been asked to help his company find a way to allow all the workers to log on to computers securely but without using
lana66690 [7]

Answer:

Webcam

Explanation:

A webcam is mainly used for taking images or videos from the computer. the webcam is a combination of two basic words i.e. web and camera. webcam can be connected to any computer via USB. It can be mounted on the desktop and sometimes it comes inbuilt on the laptops.

A webcam is also used for face recognition function to login to a computer system.

so according to the scenario, the most appropriate answer is a webcam.

6 0
4 years ago
Why crt and plasma are not used in laptop ?​
AlekseyPX

Answer:

Plasma monitors are power hungry devices 2 - 3 times more than a CRT monitor making this technology unfit for use in portable devices like laptop computers where batteries are used as the power source. Plasma monitors are extremely susceptible to screen burn.

Explanation: pls mark my answer as brainlist

6 0
3 years ago
ou are working as a technician on a computer loaded with MS Windows. You boot the computer that has an incorrect driver loaded f
jeka94

Answer:

My Computer>>Properties>>Device Manager>>Video Card Properties>>Drivers Tab>>Roll Back Driver.

Explanation:

The user can do so by reverting the driver to the previous  version, The correct process to do so is by the Right Clicking on the computer menu and clicking device manager from the properties. In the device manager, click the properties of the video card and select the Drivers tab. In the Drivers tab, click on the Roll Back Driver. This will restore to the previous driver.

7 0
4 years ago
An engineer created three VSANs on the Cisco MDS switch. VSAN 100 is allocated to the marketing department, VSAN 110 is allocate
SCORPION-xisa [38]

Answer:

Option B i.e., mdsswitch# show Vsan membership is the correct option.

Explanation:

The following commands is used by the engineer because it displays the membership of the VSAN( virtual storage area network).

switch# command is used to enter the configuration mode. So, the engineer using the following commands to verify that the interfaces for the research department.

7 0
3 years ago
Other questions:
  • What do you click to create a new presentation in Normal view? A. Section B. Blank Presentation C. Layout D. New Slide
    14·2 answers
  • Exit network systems, information support, and software development are all careers in which career cluster?
    10·1 answer
  • Which director has shot a movie in HD? George Lucas, Michael Mann, Michael Moore, none of the above, all of the above
    14·1 answer
  • What is one effective way for employees to keep their skillsets current?
    8·2 answers
  • Photoshop files are generally small in size. True or false
    13·1 answer
  • Which code will print a random number between 1 and 100?
    15·2 answers
  • List six features of the Microsoft ​
    10·1 answer
  • What are the 3 rules of music<br><br> ps: there is no music subject so i had to put something else
    15·2 answers
  • Cultural differences may make it difficult for team members to _____. Select 4 options.
    14·1 answer
  • A hub is a central computer true or false?
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!