Question
Wireless Solutions, Inc., is a business that sells cell phones and wireless service. You are a programmer in the companys information technology (IT) department, and
Wireless Solutions, Inc., is a business that sells cell phones and wireless service. You are a programmer in the companys information technology (IT) department, and your team is designing a program to manage all of the cell phones that are in inventory. You have been asked to design a class that represents a cell phone. The data that should be kept as fields in the class are as follows:
The name of the phones manufacturer will be assigned to the manufact field.
The phones model number will be assigned to the model field.
The phones retail price will be assigned to the retailPrice field.
The class will also have the following methods:
A constructor that accepts arguments for the manufacturer, model number and retail price.
A setManufact method that accepts an argument for the manufacturer. This method will allow us to change the value of the manufact field after the object has been created, if necessary.
A setModel method that accepts an argument for the model. This method will allow
us to change the value of the model field after the object has been created, if necessary.
A setRetailPrice method that accepts an argument for the retail price. This method will allow us to change the value of the retailPrice field after the object has been
created, if necessary.
A getManufact method that returns the phones manufacturer.
A getModel method that returns the phones model number.
A getRetailPrice method that returns the phones retail price.
A toString method that prints out the phones manufacture, model and price.
Write a program that creates a CellPhone object and tests all the methods
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started