Computers and Technology
Computers and Technology, 05.04.2021 20:10, sjoel004

Create a Java class named Computer that represent a computer. The Computer class should include three private instance variables as follows: • instance variable named brand that represent computer brand name. The type is String.
• instance variable named price that represent computer price. The type is double.
• instance variable named year that represent computer manufacturing year. The type is integer.
Your class should have the following operations (instance methods):
• a parameterized constructor that initializes the three instance variables with the parameter values.
• setter and getter methods for all instance variables.
Write a demo class named ComputerDemo which includes a main method to do the following:
• create two objects of type Computer.
• apply all instance methods on the two objects.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 20:50, ashiteru123
What is the difference between windows 7 and windows 10?
Answers: 1
image
Computers and Technology, 23.06.2019 12:00, daelinrobinson
If you're using an existing powerpoint presentation that will receive new slides based on a word outline, select the a. slide that will appear after the new slides. b. first slide in the presentation. c. slide that will appear before the new slides. d. last slide in the presentation.
Answers: 2
image
Computers and Technology, 24.06.2019 00:20, danielmartinez024m
The guy wire bd exerts on the telephone pole ac a force p directed along bd. knowing the p must have a 720-n component perpendicular to the pole ac, determine the magnitude of force p and its component along line ac.
Answers: 2
image
Computers and Technology, 24.06.2019 07:30, LuckyCharms988
Consider the folloeing website url: what does the "http: //" represent? a. protocal identifier. b. ftp. c. domain name d. resource name
Answers: 2
Do you know the correct answer?
Create a Java class named Computer that represent a computer. The Computer class should include thre...

Questions in other subjects:

Konu
English, 04.02.2021 01:00