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
julia-pushkina [17]
3 years ago
10

If anybody is skilled in Python and CS Theory PLEASE add me on Discord Avernakis/EVaDiSh#1460

Computers and Technology
1 answer:
iragen [17]3 years ago
4 0

Answer:

ok search for kinghacks365

Explanation:

You might be interested in
Consider an interface p ublic interface NumberFormatter { String format (in n); } Provide four classes that implement this inter
sesenic [268]

Answer and Explanation:

Here is the code for the question with output.

public interface NumberFormatter {

  public String format(int n);

}

class DefaultFormatter implements NumberFormatter

{

  public String format(int n)

  {

      return String.valueOf(n);

  }

}

class DecimalFormatter implements NumberFormatter

{

  public String format(int n)

  {

      return String.format("%,d",n); //formats the number by putting comma for 3 digits

  }

}

class AccountingFormatter implements NumberFormatter

{

  public String format(int n)

  {

      return String.format("(%d)",n);

  }

}

class BaseFormatter implements NumberFormatter

{

  int base;

 

  public BaseFormatter(int b)

  {

         

      base = b;

      if(base < 2 || base > 36) //if values out of range 2-36 inclusive are given, set default to 2

          base = 2;

  }

  public String format(int n)

  {

      return Integer.toString(n, base);      

  }

  int getBase()

  {

      return base;

  }

}

public class TestNumberFormatter {

  private static void print(int n, NumberFormatter formatter)

  {

      String s = String.format("%15s",formatter.format(n));

      System.out.print(s);

  }

  public static void main(String[] args) {

      int numbers[]= {100,55555,1000000,35,5};

      DefaultFormatter defFmt = new DefaultFormatter();

      DecimalFormatter deciFmt = new DecimalFormatter();

      AccountingFormatter accFmt = new AccountingFormatter();

      BaseFormatter baseFmt=new BaseFormatter(16) ; //base 16

      String s;

     

      System.out.println("\tDefault \t Decimal \tAccounting \t Base("+baseFmt.getBase()+")");

      for(int i = 0; i < numbers.length; i++)

      {

          print(numbers[i], defFmt);

          print(numbers[i], deciFmt);

          print(numbers[i], accFmt);

          print(numbers[i], baseFmt);

          System.out.println();//new line

      }

     

  }

}

output

  Default    Decimal    Accounting    Base(16)

100 100 (100) 64

55555 55,555 (55555) d903

1000000 1,000,000 (1000000) f4240

  35 35 (35) 23

5 5 (5) 5

3 0
3 years ago
What types of standards are developed by the Electronics Industries Alliance (EIA)?
vladimir1956 [14]

Answer:

It comprises individual organisation that together have agreed on certain data transmissions standards such as EIA/TIA -232 formerly known as RS- 232

5 0
3 years ago
Read 2 more answers
WILL GIVE BRAINLEIST PLZ HELP PLZ AND THANK YOU
Anna35 [415]

Answer:

SIR I AM A BRAINLT MODERRATER U CAN NOT POST THINGS LIKE THIS  I LOOKED THIS UP AND ITS A TEST

Explanation:

3 0
3 years ago
(blank) is an expansion card that enables a computer to connect to a network:
laiz [17]

Answer:

A

Explanation:

7 0
2 years ago
Peter wants to query to determine the names of the students who scored more than 95 in the internal assessment test which functi
Mariulka [41]

the answer is floor

It's too short. Write at least 20 characters to explain it well.

8 0
4 years ago
Other questions:
  • The Freemont Automobile Factory has discovered that the longer a worker has been on the job, the more parts the worker can produ
    11·1 answer
  • 22 If you are involved in a violation and you do not have insurance to comply with the __________________, your driver license a
    9·2 answers
  • What does the cpu do (in terms of register contents and stack) when it executes a jsr instruction?
    12·1 answer
  • Which VPN topology is also known as a hub-and-spoke configuration?
    15·1 answer
  • The signal(s)that control the direction that data is transferred on its buslines is the _________ signal(s).
    11·1 answer
  • One side in a Transmission Control Protocol (TCP) connection has not been able to properly recover from a series of malformed se
    6·1 answer
  • HELP PLEASE!!!
    7·1 answer
  • Desirable workplace habits and skills include:
    14·1 answer
  • 14 POINTS AND WILL ASWER BRAINIEST ANSWER ASAP TEST
    15·2 answers
  • In balloon framing, the second floor joist sits on a horizontal framing member called a _____.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!