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

Object-Oriented Programming (Using Java Language)

Computers and Technology
1 answer:
Delicious77 [7]2 years ago
3 0

Answer:

import java.util.Scanner;

class Main {  

 public static void main(String args[]) {

       Scanner scan = new Scanner(System.in);

       System.out.print("Enter a decimal value (0 to 15): ");

       int num = scan.nextInt();

       scan.close();

       

       if (num < 0 || num >15) {

           System.out.printf("%d is an invalid input\n", num);

       } else {

           System.out.printf("The hex value is %X\n", num);

       }

 }

}

Explanation:

Hopefully this example will get you going for the other assignments.

You might be interested in
What were the advantages and disadvantages of agricultural technology to us.
Digiron [165]

Advantages of technology in agriculture include expediting crop production rate and crop quantity, which in turn reduces costs of production for farmers and food costs for consumers, and even makes crops more nutritious and livestock bigger and meatier.

The excessive use of chemicals by the help of machines reduces the fertility of the land.Lack of practical knowledge the farmers cant handle the machines properly.While the cost of maintenance is very high.Overuse of machines may lead to environmental damage.It is efficient but has many side effects and drawbacks.

5 0
3 years ago
Read 2 more answers
In a stack data structure, the following items are inserted in the following order: Bob, Alice, Charlie, Eve, Zebra. Then an ite
const2013 [10]

Answer:

Zebra.

Explanation:

Stack is LIFO, so Zebra is added in the last so it will be removed first.

6 0
2 years ago
Jen's house contains the following devices:
poizon [28]

Answer:

Jen's laptop and her daughter's phone, because they are both connected to the router and turned on.

Explanation:

A network comprises of two or more interconnected devices such as computers, routers, switches, smartphones, tablets, etc. These interconnected devices avail users the ability to communicate and share documents with one another over the network.

Additionally, in order for a network to exist or be established, the devices must be turned (powered) on and interconnected either wirelessly or through a cable (wired) connection.

Hence, the computers which are currently networked are Jen's laptop and her daughter's phone, because they are both connected to the router and turned on. A smartphone is considered to be a computer because it receives data as an input and processes the input data into an output (information) that is useful to the end user.

6 0
2 years ago
Describe how MICR is used to read these details from the cheque​
KatRina [158]

Answer:

A MICR device reading the magnetic ink on a cheque. (the ink contains iron particles). This special ink is used to write customer account numbers on the bottom of cheques. The MICR device reads the account numbers then converts it to a form the computer can understand.

Explanation:

A MICR device reading the magnetic ink on a cheque. (the ink contains iron particles). This special ink is used to write customer account numbers on the bottom of cheques. The MICR device reads the account numbers then converts it to a form the computer can understand.

7 0
2 years ago
Print Job Cost Calculator (10 points)
Ad libitum [116K]

Answer: Provided in the explanation section

Explanation:

Provided is the code  to run this program

Source Code:

import java.util.Scanner;

class PrintJobCost

{

  public static void main(String[] args) {

      Scanner input=new Scanner(System.in);

      System.out.print("Enter print job info:");

      String info=input.nextLine();

      String size="",type="";

      int count=0,i=0,len=info.length();

      double cost=0.0;

      while(info.charAt(i)!=' '){

          size=size+info.charAt(i);  

          i++;

      }

      i++;

      while(info.charAt(i)!=' '){

          type=type+info.charAt(i);

          i++;

      }

      i++;

      while(i<len){

          count=count*10+Integer.parseInt(String.valueOf(info.charAt(i)));

          i++;

      }

      if(size.equals("Letter"))

          cost=cost+0.05;

      else if(size.equals("Legal"))

          cost=cost+0.06;

      else if(size.equals("A4"))

          cost=cost+0.055;

      else if(size.equals("A5"))

          cost=cost+0.04;

      if(type.equals("Grayscale"))

          cost=cost+0.01;

      else if(type.equals("Colored"))

          cost=cost+0.10;

      cost=cost*count;

      System.out.printf("print job Cost:$ %.2f\n",cost);

  }

}

cheers i hope this helped !!!

8 0
3 years ago
Other questions:
  • What is the output of the following code snippet? double income = 45000; double cutoff = 55000; double minIncome = 30000; if (mi
    14·1 answer
  • Mike needs to write the primary objectives of a project in a project plan. In which section should he write them?
    6·1 answer
  • Electronic ledger that tracks mathematical data
    6·1 answer
  • Which of the following tends to be true of silent film acting as opposed to sound film acting?
    7·1 answer
  • The only way to print a photo is on a special glossy paper using professional printing services in a store
    9·2 answers
  • Does anyone have the GCSE 2018 Design Technology J310/01 practice paper?
    15·1 answer
  • Problem 1: you must write a method for this problem called sentenceAnalyzer Write a program that reads a sentence from the keybo
    10·1 answer
  • HELP PLEASE
    7·1 answer
  • ---------------------- use of the Internet to access programs and data on computers that are not owned and managed by the user o
    9·1 answer
  • What software application is most appropriate to use to create multimedia presentations?
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!