Create a testheadphone class

Assignment Help JAVA Programming
Reference no: EM131596650

Homework

Before attempting this project, be sure you have completed all of the reading assignments, hands-on labs, discussions, and assignments to date.

Create a Java class named HeadPhone to represent a headphone set. The class contains:

- Three constants named LOW, MEDIUM and HIGH with values of 1, 2 and 3 to denote the headphone volume.
- A private int data field named volume that specifies the volume of the headphone. The default volume is MEDIUM.
- A private boolean data field named pluggedIn that specifies if the headphone is plugged in. The default value if false.
- A private String data field named manufacturer that specifies the name of the manufacturer of the headphones.
- A private Color data field named headPhoneColor that specifies the color of the headphones.
- getter and setter methods for all data fields.
- A no argument constructor that creates a default headphone.
- A method named toString() that returns a string describing the current field values of the headphones.
- A method named changeVolume(value) that changes the volume of the headphone to the value passed into the method

Create a TestHeadPhone class that constructs at least 3 HeadPhone objects. For each of the objects constructed, demonstrate the use of each of the methods. Be sure to use your IDE to accomplish this assignment.

Reference no: EM131596650

Questions Cloud

Recommended directional strategy for the company : What is your recommended directional strategy for the company's key divisions or business units?
Speculate on the primary manner in which your team-building : Speculate on the primary manner in which your team-building activity will lead to enhanced teamwork between the members after they are back on the job.
Disadvantages of having touch screen devices in workplace : Touch screens are becoming extremely popular input devices for phones and tablets. Assess the value of touch screen devices related to human-computer.
Identify which financing option you think is the best option : Identify which financing option you think is the best option for SunsTruck to pursue given Shaun's constraints. Please explain the rationale for your decision.
Create a testheadphone class : Create a Java class named HeadPhone to represent a headphone set - Create a TestHeadPhone class that constructs at least 3 HeadPhone objects.
Examine the overall consumer behaviors : Examine the overall consumer behaviors and determine the manner in which these behaviors relate to consumer demographics and lifestyles.
Discuss about the current organizations operations : Discuss the differences between managing the current organizations operations and preparing for future operations that arise from diversification.
Current system for fictional healthcare organization : This week, you will conduct system analysis. System analysis is a process of collecting, organizing, and evaluating data about the information systems.
Principal-agent and principal principal conflicts : 1. Briefly, explain the role of managers in both Principal - Agent and Principal - Principal conflicts.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Problem regarding the java bytecode analysis

One property of a Java program that is checked by the veri?er is that each object must be properly initialized before it is used. This property is fairly dif?cult to check. One relatively simple part of the analysis, however, is to guarantee that ..

  A mini game made in java using zen graphics

a mini game made in Java using Zen graphics .

  Write various bindings to determine semantics

Write the various bindings that are required to determine the semantics when statement is executed. For each binding, indicate binding time used for language. Describe your answer.

  Create java class that represents your musical instrument

Create your own Java class that represents your favorite musical instrument. Your musical instrument class should have at least 3 constants, 5 private data fields, getters and setters for each private data field.

  Survey conductor application

Survey Conductor Application: You have been asked by your manager to create a user-friendly application that will present a survey to your customers

  Track of a history of transactions

Consist of fourmethods in addition to the main method. You will be writing a program to keep track of a bank account as each transaction

  What are the diagrams defined in the uml standard

Why does the following code give a compiler error? How should it be fixed? What are the diagrams defined in the UML Standard. Give a one or two sentence description of each one.

  Create a program that does runtime performance

Create a program that does runtime performance analysis of ArrayLists, TreeSets and HashSets.Add 100,000 random random integers ( 0 - 1,000,000 )Attempt to remove 10,000 random integers ( 0 - 1,000,000 )

  Write a program in Java to check if a number is even

Write a program in Java to check if a number is even or odd in Java?

  Create a separate class for the selected product

Create a separate class for the selected product that holds the item number, the name of the product, the department in which the product belongs, the number of units in stock, and the price of each unit. You must use the product and class name th..

  Display the value stored at the index

Display the value stored at the index. Take a screenshot to verify that the words in your Array or ArrayList are displayed successfully.

  What is localization and why add it to your app

Is Google Cloud Messaging the best approach to use for push notifications? What is localization and why add it to your app?

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