Movie should be represented

Assignment Help JAVA Programming
Reference no: EM13168210

Each movie should be represented by an object of type Movie. The Movie class must provide two public fields: title and category. Both of these fields should be Strings. The class should also provide a constructor that accepts a title and category as parameters and uses the values passed to it to initialize its fields. That will be all that is in the Movie class.

I already have a class named MovieIO that has a method named getMovie. This method accepts an int argument that can be a number from 1 to 100. When called with an integer, it returns a unique title and category for each value passed to it. You should use this method to create the object Movie to fill an array list of type Movie with the 100 movies (using the add method).

Since in this project we already have all the Arraylist entries in the class MovieIO, we need to build the Arraylist of type Movie at the very beginning of the main method. When the user enters a category, use an enhanced for loop to do the comparison. Use an object as identifier in the for loop with the arraylist - Example - for (Movie m : arraylist). You can than have an if statement, within the for loop, comparing the instance variable category of the Movie object m against the keyed in category. If equal - print the title instance variable.

Reference no: EM13168210

Questions Cloud

Directions for assignment : With today’s computers, the right to privacy is an especially challenging problem. Corporate privacy and the privacy of individuals is a major concern of the Federal Government.
Scope and lifetime are distinct : Scope and lifetime are distinct yet related issues in programming languages. Languages can sometimes make design decisions that cause a conflict between the scope and the lifetime of variables. Java's decision to allow classes to be defined inside..
Reading of coefficients : Reading of coefficients a, b, c shall be done by a function named readCoeffs(). They shall be entered as double's from the keyboard by an operator, after prompt, as follows.
Automobile customers are billed : Suppose automobile customers are billed at the rate of $35 per hour for labor. Also, costs for parts and supplies are subject to a 5% sales tax. Write a program to print out a simplified bill.
Movie should be represented : Each movie should be represented by an object of type Movie. The Movie class must provide two public fields: title and category. Both of these fields should be Strings. The class should also provide a
Write in c++. read an inputfile.txt : write in C++.  read an inputFile.txt which contains integers that are virutal addresses, and I am suppossed to translate that into physical addresses using a page table and a transition lookaside buffer
Create a quick wedding program in indesign : create a quick wedding program in Indesign. Are there any websites with templates for wedding programs for Indesign? I am using Indesign CC.
Function that will merge the contents : Write a function that will merge the contents of two sorted(ascending order) arrays of type double values, storing the result in an array output parameter (still in ascending order).
Write a program that takes 10 values representin : Using a loop, write a program that takes 10 values representin exam grades (between 0 and 100) from the keyboard and outputs the minimum value, maximum value, and average value of all the values entered. Your program should not accept less than 0 ..

Reviews

Write a Review

JAVA Programming Questions & Answers

  supply a student tester class that tests all methods

Implement a class Student. For the purpose of this exercise, a student has a name and a total quiz score. Supply an appropriate constructor and methods getName( ), addQuiz(int score), getTotalScore( ), and getAverageScore ( ).

  Design a single class that expresses the commonality

Design a single class that expresses the commonality of these concepts.

  Give an example of an exception

A. Give an example of an exception that could be generated outside your code but caught within your code

  Pronouns, and prepositions

Type addKeyword(): for each word on each page, add to a (keyword, URLs) list or dictionary, excluding articles, pronouns, and prepositions. For example:

  Write program with jframe to enter series of names

Write a program with JFrame which permits user to enter series of friends' names and phone numbers and creates file from entered data.

  Implementation activities of software development

Analysis, design, and implementation activities of software development

  Web engineering principles

web application development, Web Engineering methodology, UML-based Web Engineering (UWE), models to the expansion of web applications, Object Oriented Web Solutions (OOWS),Web Modeling Language (WebML) methodology, Object-Oriented Hypermedia Design..

  Write a program that asks the user to enter three names

Write a program that asks the user to enter three names

  Method to store the product of the two arrays in third array

Write a method to store the product of the two arrays in the third array

  Write a jsf application that reports the values

Write a JSF application that reports the values of the following system properties of the web server

  Instance methods

instance methods: setWidth(double w), setHeight(double h), double getWidth(), double getHeight() and double getArea() * A triangle's area is calculated by width*height*0.5  * all variables are private and methods public.

  Alter the prototype form page by javascript function

Alter the prototype form page so that when JavaScript function has verified that all the required fields have been filled, cookie is added to user's computer.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd