Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java code a/hirdPartyProviders/FLVS/32959 AP CompSci v9 CA/module17/rtfmod17/17.02 Assignment Instruct methods that use Instructions: For this assessment, you are going to create some sorting Insertion sort.

image text in transcribed

image text in transcribed

image text in transcribed

Java code

a/hirdPartyProviders/FLVS/32959 AP CompSci v9 CA/module17/rtfmod17/17.02 Assignment Instruct methods that use Instructions: For this assessment, you are going to create some sorting Insertion sort. 1. Create a folder called Assessment in your Unit 7 assessments folder. Create a class called Movie2. Movie2 will need instance variables title, year, and studio (of types String, int, and string, respectively). Movie2 will need appropriate methods and constructors. Make sure to have a tostring) method that prints the movie in the following format: a. b. c. Title, Year, Studio d. Save the class as Movie2.java. Mou are to create a class called TtostMovie2 and save it as TestMovie2.java. 2. a. Make sure that you create an array called myMovies. Add the following movies. Title Year Studio 2001 Columbia Tristar 2004 Disney The Muppets Take Manhattan Mulan Special Edition Shrek 2 The Incredibles Nanny McPhee The Curse of the Were-Rabbit ce Age 2004 Dreamworks 2004 Pixar 2006 Universal 2006 Aardman 2002 20th Century Fox Lilo & Stitch Robots 2002 Disney 2005 20th Century Fox 2001 Pixar Monsters Inc. b. Create a method called printMovies(0 that traverses through the array and prints out each element. Create a method called sortritles() that insertion sorts the array according to title. It should have two arguments: the array and an int parameter that if it is 1 means ascending, and 2 means descending. Your method should sort appropriately depending on the value of the second parameter (ascending or descending). It should return the sorted array Create a method called sortyears () that insertion sorts the array according to year. It should have two arguments: the array and an int parameter that if it is 1 means ascending, and 2 means descending. Your method should sort appropriately depending on the value of the second parameter (ascending or descending). It should return the sorted array Create a method called sortstudios () that insertion sorts the array according to studio. It should have two arguments: the array and an int parameter that if it is I means ascending, and 2 means descending. Your method should sort c. d e

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions