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
Anni [7]
3 years ago
9

Write a partial class that shows a class constant and an instance method. Write an instance method that converts feet to inches

using a class constant representing the number of inches in one foot. The value passed to the method represents the distance in feet.
Computers and Technology
1 answer:
MA_775_DIABLO [31]3 years ago
4 0

Answer:

Please the code snippet below, the code was writen in Kotlin Language

Explanation:

const val inches:Int= 12 .   //This is the const value

fun main(args: Array<String>) {

 //this will ask the user for input

   print("Enter a number")            

  //this will do the conversion

var valueInFeet= Integer.valueOf(readLine())*inches

   print("The value in feet is $valueInFeet feet(s)")  

   }

You might be interested in
Which of the following is NOT areserved word in Java?intpublicstaticnum
Rama09 [41]

Answer:

num

Explanation:

In java reserved words are also known as keywords, keywords are reserve words for a language that can't be used as an identifier(name of a class, name of a variable, name of an array etc.) int, public static, are reserve words.

In given question num is not a reserved word.

6 0
3 years ago
I need answer pooooooo​
lara [203]
Read the instructions right, youll get ir done
7 0
3 years ago
Password combined with pin used as an authentication requirement is an example of:
Bingel [31]
...something that the user knows.
4 0
4 years ago
Write a statement to create a Google Guava Multimap instance which contains student ids as keys and the associated values are st
Sergeu [11.5K]

Answer: provided in the explanation section

Explanation:

Note: take note for indentation so as to prevent error.

So we import com.google.common.collect.Multimap;

import java.util.Collection;

import java.util.Map;

class Main {

   public static void main(String[] args) {

       // key as studentId and List of Profile as value.

       Multimap<String,Profile> multimap = ArrayListMultimap.create();

       multimap.put("id1", new ExamProfile("examStudentId1"));

       multimap.put("id1", new ELearningProfile("userId1"));

       multimap.put("id2", new ExamProfile("examStudentId2"));

       multimap.put("id2", new ELearningProfile("userId2"));

       // print the data now.

       for (Map.Entry<String, Collection<Profile>> entry : multimap.entrySet()) {

           String key = entry.getKey();

           Collection<String> value =  multimap.get(key);

           System.out.println(key + ":" + value);

       }

   }

}

// assuming String as the studentId.

// assuming Profile as the interface. And Profile can multiple implementations that would be

// specific to student.

interface Profile {

}

class ExamProfile implements Profile {

   private String examStudentId;

   public ExamProfile(String examStudentId) {

       this.examStudentId = examStudentId;

   }

}

class ELearningProfile implements Profile {

   private String userId;

   public ELearningProfile(String userId) {

       this.userId = userId;

   }

}

This code is able to iterate through all entries in the Google Guava multimap and display all the students name in the associated students profile.

8 0
4 years ago
Marie wanted to make sure that the information in her presentation was well organized. She should _____.
Sauron [17]
Marie could either ask a friend or her parents to peer edit it and tell her if its good enough or if she should work on it more.<span />
4 0
3 years ago
Other questions:
  • What is binary coded decimal,EBCD and ASCII
    15·1 answer
  • Datta Computer Systems is considering a project that has the following cash flow data. What is the project's IRR? Note that a pr
    10·1 answer
  • What is an advantage of sharing documents in PDF format instead of Word format?
    6·2 answers
  • Spreadsheet software creates a ____, composed of a grid of columns and rows
    6·1 answer
  • An auxiliary view is always projected from the view that shows the inclined surface as a(n) _____.
    14·1 answer
  • What are some programs that you have used that have condition-controlled loops and count-controlled loops?
    10·1 answer
  • Why do i have to wait and watch videos
    11·1 answer
  • A popular Voice over Internet Protocol (VoIP) service is ________.
    12·1 answer
  • Using your computer for non-work activities while you are being paid to work is known as ________. Select one: A. cyber sleeping
    13·2 answers
  • Que quiere decir analogico
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!