Create a project that includes the Circle class

Assignment Help Programming Languages
Reference no: EM132316025

Assignment -

Part 1 - Modify the program given in the class examples section that finds the sum of integers in a file so that it finds and outputs the maximum value found in the file.

Hints: Read the first value in the file before the loop to initialize the maximum value.

Test with at least three different input file:

1. Max value is the first value in the file.

2. Max value is somewhere in the middle of the file.

3. Max value is the last value in the file.

Part 2 - Using the Circle class provided in the example called "Overriding toString, equals, and Implementing Comparable Interface", you will create a Program that mimics the ArrayList Processing example provided in the class examples.

You will do the following:

1. Create a project that includes the Circle class.

2. Create a Driver that does the following:

a. Fills an array list with 8 circles with different radii and 2 additional that are duplicates of one of the circles (10 total)

b. Removes the circles with the duplicate radii.

c. Prints the remaining circles (using toString), one per line.

Part 3 - Create a class called Box that extends the Rectangle class provided here. You should:

Provide an additional field called height.

Provide a constructor to initialize a Box object (using super).

Provide a setter for the new field.

Provide a getter for the new field.

Override the display method of the Rectangle class to display the correct information (you do not have to use super).

Add on to the Driver class so that it additionally creates a Box object and calls the display method

Hint: See the Inheritance example.

Part 4 - Create a Java Project in Eclipse with the following:

Include the Rectangle class supplied in Part 3.

Override the toString method for Rectangle.

Override the equals method for Rectangle.

Implement the comparable Interface for Rectangle (Compare by area).

Hint: provide a method in the Rectangle class called getArea that returns the area of a rectangle.

Include a Driver (similar to the one provided in the example) to demonstrate these new methods.

Reference no: EM132316025

Questions Cloud

How often would the cycle turn over in a year : Pretty Lady Cosmetic Products has an average production process time of 40 days. Finished goods are kept on hand for an average of 15 days before they are sold.
How does the fed manage the money supply : What is the FED's job and how does the FED manage the money supply? How do banks create money? Let's explore these questions as we talk about the role.
How profit could be improved by specific production decision : Describe in your own words how a job order cost system facilitates understanding how much it cost to produce a given unit of product - for example.
The three key aspects of team : As a group, identify the three (3) key aspects of a team. What are their characteristics? As a group, which of the teams do you mostly identify with and why?
Create a project that includes the Circle class : Create a Program that mimics the ArrayList Processing example provided in the class examples. Create a project that includes the Circle class
Keys to success in multinational companies : Keys to Success in Multinational Companies. Determine key benefits of creating such policies. Speculate on major ramifications if such policies are not created
Evaluate key elements of the strategic planning process : Evaluate key elements of the strategic planning process. Develop an EFE matrix that includes factors, weights, ratings, and total weighted scores.
Evaluate key elements of the strategic planning process : A BCG matrix, also known as a growth-share matrix, identifies departments and divisions within an organization that should receive fewer resources than others.
Write a Java program that will display the given output : Using iteration, write a Java program that will display the following output? 1 3 10 30 100 300 1000 3000 10000 30000

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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