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
RoseWind [281]
3 years ago
11

LAB: Convert to binary - methods

Computers and Technology
1 answer:
Georgia [21]3 years ago
8 0

Answer:

import java.util.Scanner;

public class Lab{

  public static String integerToReverseBinary(int number)

  {

      String binary = "";

      if(number == 0){

          return "0";

      }

      while(number > 0)

      {

          int remainder = number % 2;

          number = number / 2;

          binary += Integer.toString(remainder);

      }

      return binary;

  }

 

  public static String reverseString(String wordString)

  {

      String binaryString = "";

      int length = wordString.length();

      for(int i = length -1 ; i >= 0 ; i--)

      {

          binaryString += wordString.charAt(i);

      }

      return binaryString;

  }

 

Explanation:

In the java source code, the Lab class is defined which has two methods, 'reverseString' and 'integerToReverseBinary'. The latter gets the argument from the former and reverses the content of its string value, then returns the new string value. The former gets the integer value and converts it to its binary equivalence for which are converted to strings and returned.

You might be interested in
What is the current record holder for the fastest car in the world? What is the top speed of it? 100 points to whoever gets it c
olchik [2.2K]
It’s 257 mph

Hope this helps !!!!!
7 0
3 years ago
Read 2 more answers
it is a program a personal computer microprocessor uses to get the computer system started after you turn it on​
Fofino [41]

Explanation:

please repeat your question

5 0
3 years ago
The best how can i get. Ethiopian bank enterance examination for natural science grade 12?
zubka84 [21]

do your own work ************************************************************************************************************************************************************

5 0
4 years ago
Can someone please answer this for me ? What is data centre virtualization?
castortr0y [4]
Data center virtualization is the process of designing, developing and deploying a data center on virtualization and cloud computing technologies. It primarily enables virtualizing physical servers in a data center facility along with storage, networking and other infrastructure devices and equipment.
3 0
3 years ago
Create a security management policy that addresses the management and the separation of duties throughout the seven domains of a
klio [65]

Seven Domains of IT Infrastructure Seven domains can be found in a typical IT infrastructure. They are as follows: User Domain, Workstation Domain, LAN Domain, LAN-to-WAN Domain, Remote Access Domain, WAN Domain, and System/Application Domain.

Explanation:

User Domain : The User Domain covers all theusers (of any rank) that haveaccess to the other six domains.

RISKS:

  • User can destroy data in application(intentionally or not) and delete all
  • User can insert infected CD or USBflash drive into the work computer

Workstation Domain : A computer of an individual user where the production takes place

RISKS:

  • The workstation’s OS can have a known software vulnerability thatallows a hacker to connect remotelyand steal data.
  • A workstation’s hard drive can fail causing lost data

LAN Domain : Contains all of the workstations,hubs, switches, and routers. TheLAN is a trusted zone

RISKS:

  • A worm can spread through the LANand infect all computers in it.
  • LAN server OS can have a knownsoftware vulnerability.

WAN Domain : Stands for Wide Area Network and consists of the Internet and semi-private lines

RISKS:

  • Service provider can have a major network outage.
  • Server can receive a DOS or DDOS attack.
  • A FTP server can allow anonymously uploaded illegal software

LAN / WAN Domain : The boundary between the trusted and un-trusted zones.The zones are filtered with a firewall

RISKS:

  • Weak ingress/egress traffic filteringcan degrade performance.
  • A firewall with unnecessary portsopen can allow access from the Internet

System / Application Storage Domain : This domain is made up of user-accessed servers suchas email and database

RISKS:

  • A fire can destroy primary data
  • A DOS attack can cripple the organization’s email

Remote Access Domain  :The domain in which a mobileuser can access the local network remotely, usually through a VPN

RISKS:

  • Communication circuit outage candeny connection.
  • Remote communication from officecan be unsecured.
  • VPN tunneling between remotecomputer and ingress/egress routercan be hacked
6 0
3 years ago
Other questions:
  • based on the transcript, what did broadcasting the story through the medium of radio allow welles to do?
    8·1 answer
  • ​You work at a call center of a large bank where you answer credit card services related questions from customers. Lately, you h
    14·1 answer
  • The first step in the five-step process for problem solving is to ____. evaluate take action understand the task or need complet
    10·2 answers
  • The processor in Q1 above is converted into an 8-stage pipeline, similar to the one discussed on slide 8 of lecture 16. It takes
    6·1 answer
  • This method of advertising is expensive but can be the most effective method.
    15·1 answer
  • What power brake uses vacuum from the engine to aid in brake application?
    6·2 answers
  • What happens if the user sysadmin invokes the mail command interface and there are no unread mail messages?
    13·1 answer
  • What do the groups in professional networking sites allow you to do?
    10·1 answer
  • Which of the following is true about advertisements?
    15·1 answer
  • Define input hardware​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!