answer.
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
leonid [27]
1 year ago
15

Write a second constructor as indicated. Sample output: User1: Minutes: 0, Messages: 0 User2: Minutes: 1000, Messages: 5000

Computers and Technology
1 answer:
Mashcka [7]1 year ago
6 0

Complete Question:

Write a second constructor as indicated. Sample output:User1: Minutes: 0, Messages: 0User2: Minutes: 1000, Messages: 5000// ===== Code from file PhonePlan.java =====public class PhonePlan { private int freeMinutes; private int freeMessages; public PhonePlan() { freeMinutes = 0; freeMessages = 0; } // FIXME: Create a second constructor with numMinutes and numMessages parameters. /* Your solution goes here */ public void print() { System.out.println("Minutes: " + freeMinutes + ", Messages: " + freeMessages); return; }}

Answer:

The second constructor is given as:

//This defines the constructor, the name has to be the same as the class //name

PhonePlan(int numOfMinutes, int numberOfMessages) {

this.freeMinutes = numOfMinutes;

this.freeMessages = numberOfMessages

}

Explanation:

The second constructor is defined using java programming language.

  1. The given class has two constructors This is called "Constructor Overloading) which implements polymophism
  2. In the second constructor that we created, we pass in two arguments of type integer numOfMinutes and numberOfMessages.
  3. In the constructor's body we assign these values to the initially declared variables freeMinutes and freeMessages
You might be interested in
a. a large central network that connects other networks in a distance spanning exactly 5 miles. b. a group of personal computers
ki77a [65]

Complete Question:

A local area network is:

Answer:

b. a group of personal computers or terminals located in the same general area and connected by a common cable (communication circuit) so they can exchange information such as a set of rooms, a single building, or a set of well-connected buildings.

Explanation:

A local area network (LAN) refers to a group of personal computers (PCs) or terminals that are located within the same general area and connected by a common network cable (communication circuit), so that they can exchange information from one node of the network to another. A local area network (LAN) is typically used in small or limited areas such as a set of rooms, a single building, school, hospital, or a set of well-connected buildings.

Generally, some of the network devices or equipments used in a local area network (LAN) are an access point, personal computers, a switch, a router, printer, etc.

4 0
1 year ago
Five routers are to be connected in a point-to-point subnet. between each pair of routers, the designers may put a high-speed li
Natalija [7]

Let assume are lettered A to E in that order. Thus, there will be 10 potential lines: AB, AC, AD, AE, BC, BD, BE, CD, CE and DE. Each of these potential lines has 4 possibilities. Therefore, the total number of topologies is 4¹⁰=1,048,576. 1,048,576. At 100ms <span>it will take 104,857.6 seconds which is slightly above 29 hours to inspect each and one of them.</span>











6 0
2 years ago
assume that name is a variable of type stirng that has been assigned a value write an expression whose value is the last charact
Snezhnost [94]

Answer:

The most straight forward way to do it: in general string are zero index based array of characters, so you need to get the length of the string, subtract one and that will be the last character, some expressions in concrete languages would be:

In Python:

name = "blair"

name[len(name) - 1]

In JavaScript:

name = "blair"

name[name.length - 1]

In C++:

#include <string>

string name = "blair";

name[name.length() - 1];

7 0
1 year ago
Dani is paraphrasing from a paragraph of an article for a post on her blog. Which of the following strategies is least likely to
koban [17]
I would say A. She reads the entire paragraph, then rewrites it in her own words, and then checks to make sure her version is not too similar to the text from the article.


All the other ones are a little too obvious.


Hope this helps you, baii <33

4 0
2 years ago
Read 2 more answers
Which of the following can be managed using Active Directory Users and Computers snap-in?
Goryan [66]

Answer:

The answer is "Option b".

Explanation:

The active directory can manage the data with active directory customers but a snap-on machine. It is used in scrolling the list, as the earlier replies demonstrate. It will appear on the screen if there is no other startup software installed on a computer.  

This snap-on desktop is only a component, that allows its simultaneous use of different systems or devices on the very same system. It also turns the objects more or less into the pieces of the whole.

7 0
1 year ago
Other questions:
  • Gabe wants to move text from one document to another document. He should _____.
    10·2 answers
  • Pls help me. ask yourself what would jesus do...
    14·1 answer
  • The alternative to encapsulating security protocol (esp) is _________.
    10·1 answer
  • The ________ utility automatically creates duplicates of your libraries, desktops, contacts, and favorites to another storage lo
    6·1 answer
  • c++ Consider this data sequence: "3 11 5 5 5 2 4 6 6 7 3 -8". Any value that is the same as the immediately preceding value is c
    14·2 answers
  • Sara is having a tough time finding the cause of a problem on a computer she is troubleshooting. She found a possible problem bu
    15·1 answer
  • Wendy is an attacker who recently gained access to a vulnerable web server running Microsoft Windows. What command can she use t
    9·1 answer
  • Ciscon Telecom is a mobile operator in the European Union. The company provides personalized services to its customers, and its
    8·2 answers
  • You need to design a data storage scheme for Hayseed Heaven library data system. There are several hundred thousand large data r
    8·1 answer
  • If a class has member variables that are pointers, you must ensure that you implement ____.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!