subject

Create a class, traintravelcost, with the following characteristics:
•attributes of doubleduration, doubletrainfare, and string destination.
•a constructor that accepts and updates all the attributes
•normal accessors for duration and destination
•the getlodgingcost method returns: 0.0(passengers can sleep on the train)
•the gettotalcost method returns: travel fare+agent_fee
•a tostringmethod returns: "train travel to descriptionwill take durationand cost totalcost"formatted by string. format() see example below.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 01.02.2019 19:17
Aisha has finished working on a word processing document that contains 15 pages. she has added some special elements in the first three pages, page 9 and 10, and page 15 from the document. she wants to print only these pages to see how they look. which option is the correct way to represent (in the print dialog box) the pages that aisha wants to print?
Answers: 3
question
Computers and Technology, 28.01.2019 03:43
How should you specify box sizes on a web page if you want the boxes to vary according to the font size of the text they contain? a. in pixels b. in inches c. as percentages d. in em units
Answers: 2
question
Computers and Technology, 25.01.2019 20:54
1. which of the following is not an example of an objective question? a. multiple choice. b. essay. c. true/false. d. matching 2. why is it important to recognize the key word in the essay question? a. it will provide the answer to the essay. b. it will show you a friend's answer. c. it will provide you time to look for the answer. d. it will guide you on which kind of answer is required.
Answers: 1
question
Computers and Technology, 25.01.2019 20:41
*! 20 points! *jeff wants to create a website with interactive and dynamic content. which programming language will he use? a. dhtml b. html c. css d. javascript
Answers: 1
You know the right answer?
Create a class, traintravelcost, with the following characteristics:
•attributes of doubledur...
Questions
question
Mathematics, 13.01.2020 05:47
question
Mathematics, 13.01.2020 05:46
question
English, 13.01.2020 05:46
question
Mathematics, 13.01.2020 05:45
Questions on the website: 6551839