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
vlada-n [284]
3 years ago
15

A ____ is harmful computer code that spreads without your interaction, slipping from one network to another and replicating itse

lf on network computers
Computers and Technology
1 answer:
blondinia [14]3 years ago
3 0
Malware is the answer

You might be interested in
What does a wholesaler do?
Svetach [21]
Wholesalers acquire goods from manufacturers, farmers or miners, holds them then distributes them to retailers.
6 0
3 years ago
Define a function typeHistogram that takes an iterator ""it"" (representing a sequence of values of different types) and builds
Alexeev081 [22]

Answer:

def typeHistogram(it,n):

   d = dict()

   for i in it:

       n -=1

       if n>=0:

           if str(type(i).__name__) not in d.keys():

               d.setdefault(type(i).__name__,1)

           else:

               d[str(type(i).__name__)] += 1

       else:

           break

   return list(d.items())

it = iter([1,2,'a','b','c',4,5])

print(typeHistogram(it,7))

Explanation:

  • Create a typeHistogram function that has 2 parameters namely "it" and "n" where "it" is an iterator used to represent a sequence of values of different types while "n" is the total number of elements in the sequence.
  • Initialize an empty dictionary and loop through the iterator "it".
  • Check if n is greater than 0 and current string is not present in the dictionary, then set default type as 1 otherwise increment by 1.
  • At the end return the list of items.
  • Finally initialize the iterator and display the histogram by calling the typeHistogram.
3 0
2 years ago
In this assignment, you will design and create an ArrayList-based application that manages a collection of DVDs. Information abo
sergij07 [2.7K]

Create and design an arraylist based application which manages a DVDs collection.

Explanation:

DVD movie consists of a title, a rating (e.g. PG, R, etc.), and a running time in minutes.

In this project, you will create an application to allow the user to maintain a collection of DVD movies using an array.

When the application starts up, it will read in the DVD data from a text file to initialize the array, if the file is available. If the file is not there, then the program starts with an empty array. If the file is corrupted (has an invalid or missing value), then the program stops its initialization at the point of the error. The data file should contain one DVD per line, with title followed by rating followed by running time in minutes, all separated by commas. You may assume titles are all in uppercase and do not contain commas. For example:

ANGELS AND DEMONS,PG-13,138

STAR TREK,R,127

UP,PG,96

The titles may not be in alphabetical order, but the DVDs should be inserted into the array in alphabetical order.

The application will then allow its user to perform the following operations:

ADD OR MODIFY DVD - The user will be prompted to enter the title, rating and running time (in minutes) for a DVD. If the title is already in the array, then the rating and running time are updated to the supplied values. If the title is not in the array, a DVD is added to the array so that the array is sorted by title. Convert all titles to uppercase only.

REMOVE DVD - The user will be prompted to enter the title of a DVD. If the title is in the array, then the DVD is removed, shifting subsequent DVDs over one position to fill in the gap left by the removed DVD. Again, titles must match exactly (in uppercase).

GET DVDs BY RATING - The user will be prompted to enter a movie rating (e.g. PG). This operation displays a string containing all DVDs matching the given rating in the order that they appear in the DVD collection, separated by newline characters.

GET TOTAL RUNNING TIME - This operation displays the total running time of all DVDs in the collection for the user.

SAVE & EXIT - The user can quit the program, performing an automatic save if the DVD collection has been modified.

Java Files

DVD.java - A class to model a single DVD, including its title, rating and total running time.

DVDCollection.java - A class to model a collection of DVDs using an array.

DVDUserInterface.java - An interface that describes the operation required for any user interface to this DVD collection.

DVDGUI.java - A class that implements the DVDUserInterface interface and provides a graphical user interface to the DVD collection.

DVDConsoleUI.java - A class that implements the DVDUserInterface interface and provides a console user interface to the DVD collection.

DVDManager.java - A class that contains a main method that launches one of the two user interfaces for the user to work with the DVD collection based on the user input.

Complete the DVD class by completing the given methods (constructor, accessors and mutators). Add javadoc comments so you can generate a javadoc documentation file showing how to use this class.

The DVDCollection class uses an array to maintain the collection of DVDs. The DVDs should be stored in alphabetical order based on title starting at position 0 in the array, using adjacent cells. All titles should be stored in uppercase only and are assumed to be unique (no duplicates).

toString - returns a string containing all of the DVDs in the collection, separated by newlines characters, along with the value of numdvds and the length of the DVD array for debugging purposes. The string should be formatted as shown in the example below:

numdvds = 3

dvdArray.length = 7

dvdArray[0] = ANGELS AND DEMONS/PG-13/138min

dvdArray[1] = STAR TREK/R/127min

dvdArray[2] = UP/PG/96min

addOrModifyDVD - given the title, rating and running time of a DVD, add this DVD to the collection if the title is not present in the DVD collection or modify the DVD's rating and running time if the title is present in the collection.insert the DVD so that all DVDs are in alphabetical order by title.

removeDVD - given the title, this method should remove the DVD with this title from the collection if present. The title must match exactly (in uppercase). If no title matches, do not change the collection.

getDVDsByRating - given the rating, this method should return a string containing all DVDs that match the given rating in the order that they appear in the collection, separated by newlines.

getTotalRunningTime - this method should return the total running time of all DVDs in the collection. If there are no DVDs in the collection, return 0.

loadData - given a file name, this method should try to open this file and read the DVD data contained inside to create an initial alphabetized DVD collection.

save - save the DVDs currently in the array into the same file specified during the load operation, overwriting whatever data was originally there.

7 0
3 years ago
Which of these statements is true about database reports? A. A generated report will include all records in the database. B. A g
weeeeeb [17]

B. A generated report will include all records that a query fetches.

6 0
3 years ago
Consider the university enrollment database schema: 547 Student(snurn: integer, snarne: string, majoT: string, level: string, ag
trapecia [35]

Enroll a student identified by her snum into the class named 'Introduction to Database Systems' is the following transactions, state the SQL isolation level you would use.

1. Enroll a student identified by her snum into the class named 'Introduction to Database Systems'.

<u>Explanation:</u>

Since enroll is unique in the university enrollment database schema and field name is SNUM and it is data type is an integer. To identify student class name and department name and name of student SNUM field is used for searching in university enrollment database schema. Enrollment changing is not possible of the student’s not possible or not good practices in university enrollment database schema.

If a query had been made class wise or department wise enrollment is played an important role.

For  assign, a faculty is made on the class id or  department id.

8 0
3 years ago
Other questions:
  • How many packets does your computer send/receive in a single mouse click when you visit a website?
    6·1 answer
  • List and describe three options in the autocad object snap toolbar
    8·1 answer
  • COMPUTER ORGANIZATION &amp; ARCHITECTURE I question 3<br> need correct the answers to all
    12·1 answer
  • DTE just installed 500kW of solar capacity on the MCCC campus. the cost of the installation was about $3 million. what was the c
    10·1 answer
  • A system analyst generally needs to have a number of skills. For example, technical and analytical skills are required for this
    7·1 answer
  • Write a function that dynamically allocates an array of integers. The function should accept an integer argument indicating the
    8·1 answer
  • Wesley purchased a word-processing software program. He used it for a year, during which he got regular updates every two months
    9·1 answer
  • Differentiate between tabular and column form layout​
    14·1 answer
  • What is the output of this program? age=4 if age &gt;5: print (“more”) else: print (“less”)
    7·1 answer
  • Which TWO of the following are input devices that are parts of a laptop computer?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!