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
sp2606 [1]
3 years ago
12

Which layout manager constructor call would be best-suited to create a telephone handset GUI which has three rows of three keys

each with labels, 1,2,3,4,5,6,7,8,9, and a fourth row with labels *, 0, and #?Select one:a. new GridLayout(3,4)b. new GridLayout(4,3)c. new FlowLayout(4,3)d. new BorderLayout(3,4)
Computers and Technology
1 answer:
Snezhnost [94]3 years ago
7 0

Answer:

The correct option : b. new GridLayout(4,3)

Explanation:

The total number of rows are 4 and total number of columns are 3.

So the total keys can be added is 4*3=12. This is suited for telephone keypad.

You might be interested in
How you will install an operating system on your computer
defon
Someone can install an operating system by disk or removable storage media.

Disk being floppy, tape or commonly a DVD.

Removable storage being a USBdrive.
5 0
3 years ago
Papa Mario of Mario's Pizzeria has baked a huge pizza and cut it into n slices, but he is clumsy and the pizza wasn't evenly sli
rosijanka [135]

Suppose there are n student: 1, 2, 3, ..., i, ..., n.

Now, let's say each want slice size to be: t1, t2, ..., ti, ..., tn.

Let's pizza slices be : s1, s2, ..., si, ..., sn.

Now, it can be said that a student ' i ' will accept a slice of pizza ' si ' only if the size of slice is more then ' ti '.

Logic to distribute: what can be done is we can sort the demand i.e ti of students and also sort the size of pizza slices si. Now, Papa Mario can distribute the sorted slices to students sorted demand(smallest to heighest) one by one as they appear in sorted lists. Now, it will only be possible to distribute the slices to make everyone happy, if and only if in sorted lists of both s and t for each index k, it holds the condition: tk <= sk.

Let me explain you with example:

Lets says size of whole pizza is 100.

Now number of students n = 4.

Let there demands be : 20, 35, 15, 10.

This means 1st student atleast require the slice size of 20 and so on.

Case 1: Papa Mario divides the pizza into slices of size: 25, 20, 20, 35.

=> Now, we sort both lists.

Thus t => 10, 15, 20, 35

and s => 20, 20, 25, 35

Now, as we can see that for all index  tk <= sk, hence pizza can be distrubeted so that everyone can be happy.

Case 2: Papa Mario divides the pizza into slices of size: 30, 20, 20, 30.

=> Now, we sort both lists.

Thus t => 10, 15, 20, 35

and s => 20, 20, 30, 30

Now, as we can see that, for last student with demand of 35, the pizza slice alotted is of size 30, thus he is unhappy, and pizza cannot be distributed so that everyone becomes happy.

Now, after the approach, let's discuss question.

(a) Greedy algorithm paradigm is most appropriate for this problem, as what we are doing is greedily distributing small slices to those students which have least demands first then tackling bigger demands of students, by remaining bigger slices.

(b) As we are mainly sorting thel ist of sizes of pizza slices and student demands, thus we need to use an efficient algorithm to sort the lists. Such an efficient algorithm can be QuickSort() or MergeSort().

(c) Asymptotic running time of our algorithm would be O(n*logn).

3 0
3 years ago
While creating a sketch, what helps you identify positive and negative space?
Eduardwww [97]

Answer:      positive = plus sign and negativie = subraction sign

Explanation:

7 0
3 years ago
What is the function of ctrl+Q​
vlabodo [156]

Answer:

Ctrl+Q is used to remove a paragraph's formatting

Explanation:

Hope that's the answer you're looking for!

5 0
3 years ago
January 19/May 16 2022
fenix001 [56]

Answer:

This should get you started. Many things could be improved. You could keep adding layers to this program if you wanted to, so I wrote it with that in mind.

The new salary depends on the employee's department and current salary. I created a class that represents each employee. The function looks at the employee's current salary, and looks up what the employee's department raise will be (using the dictionary/hash table) before performing the calculation.

3 0
2 years ago
Other questions:
  • Define a function setheight, with int parameters feetval and inchesval, that returns a struct of type heightftin. the function s
    6·1 answer
  • The rules that determine what is allowed in a program are known as the
    14·1 answer
  • Ella has finished drafting her presentation. What should she do next?
    6·2 answers
  • _____ is a component of a data model that defines the boundaries of a database, such as maximum and minimum values allowed for a
    12·1 answer
  • How can you prevent your VMs receiving DHCP server messages from unauthorized virtual machine pretending to be DHCP servers?
    13·1 answer
  • A pangram is a sentence that contains all the letters of the English alphabet at least once. For example, the quick brown fox ju
    6·1 answer
  • Which of the following protects intellectual property?copyright
    9·2 answers
  • What has happened (or is still happening) to make this speech occur? armageddon
    15·1 answer
  • How to install an older version of prettier on yarn
    9·1 answer
  • In your own view, how can social media be used in teaching and learning in higher education?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!