Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Instructions: Convert your V3 object class from the Default Constructors assignment to V8 implementation and client classes and instantiate multiple objects. Create a 05.08 Assignment

Instructions: Convert your V3 object class from the Default Constructors assignment to V8 implementation and client classes and instantiate multiple objects.

  1. Create a 05.08 Assignment project in the Mod05 Assignments folder.
  2. Read the instructions carefully before you attempt the assignment.
  3. Before you begin coding, use a word processor to create a class diagram.
  4. In the 05.08 Assignment project, create a V8 class for your object and a V8Tester class. Use PlanetV8 as a model.
  5. Copy your V3 object class and paste it into the appropriate class shell you just created. Change any statements that mention V3 to V8.

TO MAKE --> V3 object class

  1. Create a new class that should be named for your object this is the implementation or object class. Number it as V3 to match the PlanetV3 sample. For example, if you implement a student object, the class name would be StudentV3.
    1. Provide a default constructor for your object.
    2. Write two methods to perform an action or calculation for your object. Determine the return type and parameter list.
  2. Create a new tester class with a main() method this is the client class. Use the PlanetTesterV3 sample as a guide. For example, if you are using a student object, the client class name would be StudentTesterV3.
    1. Create an instance of your class using the default constructor (no parameters).
    2. Declare variables to pass to the methods.
    3. Invoke (or call) all methods with your new object using dot notation.
  3. Print the results in a user-friendly format. (see Expected Output).

image text in transcribed

  1. Compile the project to make sure no errors were introduced and run the program to verify that it still works. Fix any errors that show up before moving on to the next step.
  2. In the object implementation class:
    1. Declare private instance variables
    2. Define an overloaded constructor (a loaded constructor with parameters)
    3. Initialize the instance variables
    4. Define at least one overloaded method.
    5. Add getter and setter methods for each instance variable
    6. Add any methods to your object you would like.
  3. In the client class:
    1. Instantiate at least three instances of your V8 object
      • Use the default constructor at least once
      • Use at least one loaded constructor (with parameters)
        • Do not use variables, just enter the values in the parameter list
    2. Invoke the necessary methods to calculate or manipulate data for the objects
      • Use each overloaded method at least once
    3. Use the getter methods when printing objects created with the loaded constructor
  4. Print the results in a user-friendly format. (Hint: use the \t escape character)
  5. Be sure to document each section of the code.

Expected Output: When the program runs correctly, the output will resemble the following screen shot. Your output will show results for your objects.

image text in transcribed

Rubric:

05.08 Constructing Multiple Objects Grading Rubric

Components

Points Possible

Points Earned

Class diagram provided.

1

Comments include name, date, and purpose of program.

1

Project consists of two separate classes in two separate files.

1

Private instance variables declared.

1

At least one overloaded constructor included.

1

Loaded constructors initialize ALL private instance variables.

1

Getter/setter methods correctly written and used in main() method.

1

Method headers correctly written. Provide one overloaded method.

1

Multiple objects constructed.

1

Every constructor invoked.

1

Each overloaded method invoked on an object from main() method.

1

Getter methods correctly used in main() method.

1

All calculations and data manipulation are accurate.

1

No compiler or runtime errors.

1

Thoughtful PMR included.

1

Total

15

4 Blue): Terminal Window - 5.05 APCS Options Grades: Grade 1 Grade 2 Average Difference 85 92 88.5 7 Can only enter input while your programming is running Blue): Terminal Window - 5.08 APCS Options Student Grade 1 Grade 2 Average 85 John Alisa Jessica 90 90 92 84 87.5 91.0 88.0 92

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

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

3rd Edition

0471418455, 978-0471418450

More Books

Students also viewed these Databases questions