Design and implement a set of classes and interfaces and

Assignment Help JAVA Programming
Reference no: EM13347898

Design and implement a set of classes and interfaces and use them to evaluate the RTA's resource requirements. 

Your program must meet the subsequent guidelines:

- You must use at least one abstract class, with appropriate final and abstract methods, and at least one interface; you may wish to have several abstract classes and interfaces. You must have at least one abstract method and one final method in at least one class.

- You may not represent the route type (bus, urban rail or commuter rail) or the right of way type (shared or dedicated) as a data member.

- Each subclass must inherit its data and methods from a superclass or an interface to the maximum extent possible. Override superclass methods as needed.

- Each subclass must not contain data that is not relevant. For example, the Red Line may not have stops or additional vehicles, and the 77 bus may not have stations, staff per train, vehicles per train, or staff per station. A subclass must not have any data marked "na" in the table above. You may not set "na" variables equal to one in a subclass that does not use them; they must not be present.

- If a route type has a certain data member, your design must require that it be present. For example, your design must require all shared ROW routes to have a number of stops. All urban rail and commuter rail routes must have a number of stations, staff/station and staff/train. o An interface cannot force an implementing class to have a data member, but if the interface has a method getX(), the implementing method will need to either have a data member X or compute X. This meets the requirement of the problem set.

- You may use protected access for data members to be inherited by subclasses, except that any data member managed by a final method must be private.

- Data members and methods must be defined in the highest level of the inheritance tree possible. For example, the data members that exist for all routes must be defined in a Route class, not in BusRoute, UrbanRailRoute or CommuterRail classes. o All of your methods will be very simple; they should all be just one line.

- You must write classes or subclasses for the combinations of Route and ROW listed at the in the table above. You should not write any other combination of Route and ROW. o You do not need to have a class for bus routes just on dedicated ROW o You do not need to have a class for urban rail routes just on shared ROW

- You must write a class RouteTest with only a main() method to test your software. In main(), write code to:

- Create objects for five routes: bus 77, Silver Line/Airport, Red Line, Green Line B and Lowell Line

- Compute and output (System.out.println) the number of vehicles and staff required for each route, including the number of engines for commuter rail routes. You will have fractional values, which is fine.

- Output the number of stops and/or stations for each route.

- Compute and output the total number of vehicles for bus routes, for urban rail routes and for commuter rail routes. (This will be three totals) You must use the instanceOf keyword in your loop to determine what kind of vehicle is used on a route, since all routes have the
same getVehicle() method. Include commuter rail engines, using getEngine().

- Compute and output the total staff across all routes.

Reference no: EM13347898

Questions Cloud

Problem 1a barometer is used to measure atmospheric : problem 1a barometer is used to measure atmospheric pressure and is filled with a high-density fluid. the pressure p
Human computer interactionnbsp students self-service : human computer interactionnbsp students self-service website for mobile devicesthis is a hypothetical interaction
1 introductionyou will create a c program to evaluate : 1 introductionyou will create a c program to evaluate expressions combining set union set intersection and parentheses.
Australia has recognised that its accounting standards need : australia has recognised that its accounting standards need to be harmonised with standards elsewhere in the world. to
Design and implement a set of classes and interfaces and : design and implement a set of classes and interfaces and use them to evaluate the rtas resource requirements.nbspyour
1 the scenarioyou have been asked to prepare a feasibility : 1. the scenarioyou have been asked to prepare a feasibility study and an initial design to enable a large holiday
The goal is to create a project that would let a user : the goal is to create a project that would let a user compute area and perimeter of a polygon. restrict the type of
Prepare an original argument about an issue around which : prepare an original argument about an issue around which there is some legitimate debate. you will need to start by
Question 1ziegler-nichols open loop tuningoften when : question 1ziegler-nichols open loop tuningoften when working with a faster loop many people will opt only for a pi

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd