subject
Computers and Technology, 24.04.2020 20:32 KaleahV

Write a super class Vehicle which has the following--- Attributes: (1) wheel (number of wheel) and (2) seat (number of seat). Constructor: which sets the value of wheel and seat. Methods: (1) get Wheel()—returns the number of wheel (2) getSeat()—returns the number of seat Write a subclass Car which has the following-- Attributes: (1) door (number of door) and (2) window (number of window). Constructor: which sets the value of door, window, wheel and seat. Methods: (1) getWindow()—returns the number of window (2) getDoor()—returns the number of door Write a subclass Motorcycle which has the following-- Attributes: (1) helmet (number of helmet) Constructor: which sets the value of helmet, wheel and seat. Methods: (1) get Helmet()—returns the number of helmet Write a Demo class which creates objects of Vehicle, Car, and Motorcycle classes and call the corresponding methods.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 07:00
You will be given two character arrays of the same size, one will contain a number of ships. ships will move around the character array based on which way they are facing and the route they are on. routes are given in the other array. the route consists of '-' and '|' for straight paths, '\' and '/' for curves, and '+' for intersections. there are ships on these routes. ships always face a direction, '^' for up, '> ' for right, 'v' for down, and '< ' for left. any time the ships hit a '\' or a '/' it will turn as you would expect a ship to turn (e.g. a '^' that moves into a '/' will turn right). at an intersection, ships will always continue straight through. all ships move at the same speed, ships take turns moving and all ships move during one 'tick'. the one in the most top left goes first, followed by those to its right, then the ones in the next row. it iterates along the rows and then down the columns. each ship moves one space on its turn moving along the route. your function needs to return the position of the first collision between two ships and the number of ticks before the crash occurred.
Answers: 2
question
Computers and Technology, 22.06.2019 17:40
Write a modular program (no classes yet, just from what you learned last year), that allows two players to play a game of tic-tac-toe. use a two-dimensional char array with 3 rows and 3 columns as the game board. each element of the array should be initialized with an asterisk (*). the program should display the initial board configuration and then start a loop that does the following: allow player 1 to select a location on the board for an x by entering a row and column number. then redisplay the board with an x replacing the * in the chosen location. if there is no winner yet and the board is not yet full, allow player 2 to select a location on the board for an o by entering a row and column number. then redisplay the board with an o replacing the * in the chosen location. the loop should continue until a player has won or a tie has occurred, then display a message indicating who won, or reporting that a tie occurred. player 1 wins when there are three xs in a row, a column, or a diagonal on the game board. player 2 wins when there are three ox in a row, a column, or a diagonal on the game board. a tie occurs when all of the locations on the board are full, but there is no winner. input validation: only allow legal moves to be entered. the row must be 1, 2, or 3. the column must be 1, 2 3. the (row, column) position entered must currently be empty (i.e., still have an asterisk in it).
Answers: 1
question
Computers and Technology, 23.06.2019 16:30
20 points archie wants to use a reflector as he photographs a newlywed couple. what would he consider in his choice? a. shadow and sunny b. homemade and professional c. lamps and boards d. incident and reflected e. neutral density and enhancement
Answers: 3
question
Computers and Technology, 25.06.2019 02:30
On the pie chart below, which “slice” represents 30% of the budget?
Answers: 2
You know the right answer?
Write a super class Vehicle which has the following--- Attributes: (1) wheel (number of wheel) and (...
Questions
question
English, 16.10.2020 01:01
question
Mathematics, 16.10.2020 01:01
question
Mathematics, 16.10.2020 01:01
question
Mathematics, 16.10.2020 01:01
question
History, 16.10.2020 01:01
Questions on the website: 13722367