Create instance variables

Assignment Help Basic Computer Science
Reference no: EM132253214

1.) I have to make a class named after any favorite object in the whole world

2.) Then I have to Create Instance Variables (fields) 

  • Then I have to make at least 3 private instance fields (attributes) for my class
  • I must use at least 3 different data types for my fields

3. Then I have to create getter (accessor) and setter (mutator) methods  

  • Then I must make a getter (accessor) method for each of my instance variables
  • Then I have to make a setter (mutator) method for each of my instance variables 

4. Next, was to make a Method to display my data

  • Then, I have to make a method called display, that simply prints out the values of all instance variables of my object

5. After, that I must create 2 additional methods that my object should normally have, and the methods should print something out and also modify the object in some way. Then, I have to test out both of these method for at least one of my objects. 

6. Then, I have to create 2 Constructors

  • I then, have to make a default constructor (no parameters) that assigns all my instance variables to default values 
  • Next, I must make a parameterized constructor that takes all instance variables as parameters, and sets the instance variables to the values provided by the parameters 

7. Then, I have to test my program

  • After, that I must make a class called Demo.java. This class will contain my main method
  • Then, I have to create 2 instances of my class by using the default constructor. 
  • I then have to call all my objects set methods to assign values to my object
  • Next, I have to create 2 instances of your class by using the parameterized constructor 

8.) Then, finally I have to put all of my objects in an ArrayList, loop through the array, and call the display method on each object

Reference no: EM132253214

Questions Cloud

Organizational culture manifests in organization : Define how organizational culture manifests in an organization.
Client clicks on the link until : Assuming zero transmission time of the object, how much time elapses from when the client clicks on the link until the client receives the object?
Pseudocode for this program with multiple modules : A personal trainer asks you to write a program to calculate and display a clients' body mass index (BMI) using the formula BMI = Weight x 703/Height2
Company that provides technical support : You are a new employee at a tech company that provides technical support.
Create instance variables : 1.) I have to make a class named after any favorite object in the whole world
Discuss the various levels and types of strategies firm use : Outline a communications plan the company could use to make the strategies you recommend above known to all stakeholders.
Single quote mark-double quote mark : Write print statement to display the following output (the single quote mark, double quote mark, and the backslash in the output must be printed using escape
Relationship in dehumanization-objectification and violence : What do you think she means by this? What is the relationship between dehumanization, objectification, and violence?
Describe how an information system : Define one business process and describe how an information system can be used in that process to collect data

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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