Write an Enlistee class that keeps data attributes for the following pieces of information: • Enlistee name • Enlistee number Next, write a class named Private that is a subclass of the Enlistee class. The Private class should keep data attributes for the following information: • Platoon number (an integer, such as 1, 2, or 3) • Years of service (also an integer)

Answers

Answer 1
Answer:

Answer:

function Enlistee( name, number ){

    constructor( ){

      super( ) ;

      this.name= name;

      this.number= number;

      this.Private= ( platoonNumber, yearOfService ) =>{

                             this.platoonNumber = platoonNumber;

                             this.yearOfService = yearOfService;

                             }

     }

}                

Explanation:

In Javascript, OOP ( object-oriented programming) just like in other object oriented programming languages, is used to create instance of a class object, which is a blueprint for a data structure.

Above is a class object called Enlistee and subclass "Private" with holds data of comrades enlisting in the military.


Related Questions

is the amount of variation between the lightest highlight and the darkest shadow in a particular image.
#Imagine you're writing a program to check if a person is #available at a certain time. # #To do this, you want to write a function called #check_availability. check_availability will have two #parameters: a list of instances of the Meeting class, and #proposed_time, a particular date and time. # #check_availability should return True (meaning the person #is available) if there are no instances of Meeting that #conflict with the proposed_time. In other words, it should #return False if proposed_time is between the start_time and #end_time for any meeting in the list of meetings. # #The Meeting class is defined below. It has two attributes: #start_time and end_time. start_time is an instance of the #datetime class showing when the meeting starts, and #end_time is an instance of the datetime class indicating #when the meeting ends. # #Hint: Instances of the datetime have at least six #attributes: year, month, day, hour, minute, and second. # #Hint 2: Comparison operators work with instances of the #datetime class. time_1 < time_2 will be True if time_1 is #earlier than time_2, and False otherwise. # #You should not assume that the list is sorted. #Here is our definition of the Meeting class: from datetime import datetime class Meeting: def __init__(self, start_time, end_time): self.start_time = start_time self.end_time = end_time #Write your function here! #Below are some lines of code that will test your function. #You can change the value of the variable(s) to test your #function with different inputs. # #If your function works correctly, this will originally #print: True, then False meetings = [Meeting(datetime(2018, 8, 1, 9, 0, 0), datetime(2018, 8, 1, 11, 0, 0)), Meeting(datetime(2018, 8, 1, 15, 0, 0), datetime(2018, 8, 1, 16, 0, 0)), Meeting(datetime(2018, 8, 2, 9, 0, 0), datetime(2018, 8, 2, 10, 0, 0))] print(check_availability(meetings, datetime(2018, 8, 1, 12, 0, 0))) print(check_availability(meetings, datetime(2018, 8, 1, 10, 0, 0)))
Write a program (main method) that advises the user on programming language. So if a user for instance enters "Java" the program might say "awesome" or if the user enters "Ruby" it might say "are you sure?" . Make the program comment on at least 5 programming languages.
On a roulette wheel, the pockets are numbered from 0 to 36. The colors of the pockets are as follows: Pocket 0 is green. For pockets 1 through 10, the odd-numbered pockets are red and the even-numbered pockets are black. For pockets 11 through 18, the odd-numbered pockets are black and the even-numbered pockets are red. For pockets 19 through 28, the odd-numbered pockets are red and the even-numbered pockets are black. For pockets 29 through 36, the odd-numbered pockets are black and the even-numbered pockets are red. Write a program that asks the user to enter a pocket number and displays whether the pocket is green, red, or black. The program should display an error message if the user enters a number that is outside the range of 0 through 36.
Write a statement that assigns total_coins with the sum of nickel_count and dime_count. Sample output for 100 nickels and 200 dimes is: 300

All of the following are strengths of the Internet as a source of information except

Answers

Answer: C

Explanation: Using the process of elimination can rather easily get you the answer. The internet is constantly updating as things happen, so A is true. B is true as well because a simple googling of a question can get you the answers or facts of said question. D applies under the same vain as A. So C is the only possible answer.

_________ is a business strategy in which a company purchases its upstream suppliers to ensure that its essential supplies are available as soon as the company needs them.The bullwhip effect

Vertical integration

JIT

VMI

Answers

Answer:

Vertical Integration

Explanation:

Vertical Integration is a business strategy in which a company purchases its upstream suppliers to ensure that its essential supplies are available as soon as the company needs them.  This enables the business to exercise higher control over supply related uncertainties and to optimize supplies based on changing demand or business priorities.

An example can be a textile manufacturer purchasing a dye manufacturing unit.

Definition of letter in communication skills

Answers

Answer:

Explanation:A letter is a written message conveyed from one person to another person through a medium. Letters can be formal and informal. Besides a means of communication and a store of information, letter writing has played a role in the reproduction of writing as an art throughout history.

Answer:

A letter is a written message conveyed from one person to another person through a medium. Letters can be formal and informal. Besides a means of communication and a store of information, letter writing has played a role in the reproduction of writing as an art throughout history.

  • Excellent written and verbal communication skills.
  • Confident, articulate, and professional speaking abilities (and experience)
  • Empathic listener and persuasive speaker.
  • Writing creative or factual.
  • Speaking in public, to groups, or via electronic media.
  • Excellent presentation and negotiation skills.

Initialize a list. ACTIVITY Initialize the list short.names with strings 'Gus', Bob, and 'Ann'. Sample output for the given program Gus Bob Ann 1 short_names- Your solution goes here 2 # print names 4 print(short_names[0])

Answers

Answer:

shortNames = ['Gus', 'Bob','Zoe']

Explanation:

In this assignment, your knowledge of list is been tested. A list is data structure type in python that can hold different elements (items) of different type. The general syntax of a list is

listName = [item1, "item2", item3]

listName refers to the name of the list variable, this is followed by a pair of square brackets, inside the square brackets we have items separated by commas. This is a declaration and initialization of a list with some elements.

The complete python code snippet for this assignment is given below:

shortNames = ['Gus', 'Bob','Zoe']

print(shortNames[0])

print(shortNames[1])

print(shortNames[2])

What character makes an assignment statement an assignment statement?

Answers

Answer:

'='

Explanation:

The equal ('=') is the character that is used to assign the value in the programming.

In the programming, there is a lot of character which has different meaning and uses for a different purpose.

like '==' it is used for checking equality between the Boolean.

'+' is a character that is used for adding.

'-'  is a character that is used for subtraction.

similarly, '=' used for assigning.

for example:

a = a + b;

In the programming, the program evaluates the (a + b) first and then the result assigns to the variable.

You are troubleshooting network connectivity issues on a workstation. Which command would you use to request new IP configuration information from a DHCP server?

Answers

Answer:

ipconfig / release command will be used to request new IP configuration information from a DHCP server

Explanation:

The ipconfig /release sends a DHCP release notification to the client so that the client immediately releases the lease henceforth updating the server's status information . This command also mark the old client's id as being available. Thus, the command ipconfig /renew then request a new IP address.