Computers and Technology
Computers and Technology, 21.11.2019 00:31, cld3331

Create a base class called vehicle that has the manufacturer's name ( type string ), number of cylinders in the engine (type int), and ower (type person given below). then create a class called truck that is derived from vehicle and has additional properties: the load capacity in tons (type double, since it may contain a frational part) and towing capacity in tons (type double) . give your classes a reasonable complement of contructors and accessor methods, and an equals method as well. write a driver program that tests all your methods. person classpublic class person{string name; public person( ){name = "no name yet"; }public person(string initialname){name = initialname; }public void setname(string newname){name = newname; }public string getname( ){return name; }public void writeoutput( ){system. out. println("name: " + name); }public boolean hassamename(person otherperson){return this. name. equalsignorecase(otherperson. name); }}

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 16:00, eden1017
Why should characters such as / \ " ' * ; - ? [ ] ( ) ~ ! $ { } < > # @ & | space, tab, and newline be avoided in file names?
Answers: 2
image
Computers and Technology, 24.06.2019 03:30, ava1018
The footer area of a web page generally houses which website feature? terms of use web page content business name or title menu headings
Answers: 1
image
Computers and Technology, 24.06.2019 15:30, hemolelekeakua
How do i change the size of my bookmarks in my bookmarks bar in google chrome? ? plz hlp me
Answers: 2
image
Computers and Technology, 24.06.2019 20:30, glstephens04
How is energy expended in active transport
Answers: 1
Do you know the correct answer?
Create a base class called vehicle that has the manufacturer's name ( type string ), number of cylin...

Questions in other subjects:

Konu
Mathematics, 16.10.2020 17:01