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
Katen [24]
4 years ago
8

Write the definition of a class Play List Entry containing:

Computers and Technology
1 answer:
Mekhanik [1.2K]4 years ago
4 0

Answer:

class PlayListEntry:

       def __init__(self):

               self._title = ''

               self._artist = ''

               self._play_count = 0

       @property

       def get_title(self):

               return self._title

       @get_title.setter

       def set_title(self, title):

               self._title = title

       @property

       def get_artist(self):

               return self._artist

       @get_artist.setter

       def set_artist(self, artist):

               self._artist = artist

       

       @property

       def get_play_count(self):

               return self._play_count

       @get_play_count.setter

       def set_play_count(self, play_count):

               self._play_count = play_count

Explanation:

The above code is written in Python Programming Language. A class called PlayListEntry is defined with getter and setter methods. In this solution, the property decorator was used to define the getter methods and the setter method uses setter attribute of the getter method.

Notice that the instance variables of the class is preceded by an underscore. This is because I want the attributes of the class to be private. By making attributes of a class private, I mean that you cannot have a direct access to the attributes of the class. This concept an implementation of object oriented programming called Encapsulation.

You might be interested in
A group of two or more computer systems linked together via communication devices is called:.
ioda

A group of two or more computer systems linked together via communication devices is called: A Network

5 0
3 years ago
C programming: loading a dictionary into a trie data structure. Why am I segfaulting?
stepladder [879]
// initialize root code c = fgetc(dictptr); while (c != EOF) { if (c != '\n') { // traverse tree code } else { // finish word code } c = fgetc(dictprt); } <span>// finish word code
hope it helps</span>
3 0
3 years ago
Who here has a crush on jk from bts but feels more mature than him
saw5 [17]

Answer:

Nope not K-pop fan

Explanation:

3 0
3 years ago
Read 2 more answers
Which allows for saving a setting on one device and having the setting synchronize to other devices? Choose two answers.
barxatty [35]

Answer:

Bookmarks

Calendars

Explanation:

In Android devices we could save some information and then share if we use sync, we case save Bookmarks and Calendars, in addition, we could save other data like:

  • History and open tabs
  • Passwords
  • Payment info  
  • Addresses, phone numbers and more
  • Settings and preferences

Also, if you don't want to save any data in your device, you can Turn off Sync everything.

3 0
4 years ago
7) through: (0, 4) and (-1,0)​
Andreyy89

Answer:

its 5

Explanation:

7 0
3 years ago
Other questions:
  • Keion works as a freelancer creating websites and designing logos for clients. He recently had a hard drive failure and lost wor
    7·1 answer
  • For a typically large organization how many dns servers should you install
    5·1 answer
  • _____ are skilled computer users who try to gain unauthorized access to other people’s computers.
    15·1 answer
  • -How long does a copyright last?
    6·1 answer
  • What language below is used to view and manipulate data that is stored in a relational database?
    6·1 answer
  • MyProgramming Lab
    12·1 answer
  • _____ is confirming the significance of what another person is feeling.
    9·2 answers
  • Helppp plzz ajjsndndbsskdjf​
    11·1 answer
  • What changes the size of a video when played?
    10·2 answers
  • How to mark a discussion as read on canvas dashboard.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!