Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

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.

Java, Programming

  • Category:- Java
  • Reference No.:- M9132262
  • Price:- $25

Priced at Now at $25, Verified Solution

Have any Question?


Related Questions in Java

Can someone please help me with the following java

can someone please help me with the following java question The input is an N by N matrix of nonnegative integers. Each individual row is a decreasing sequence from left to right. Each individual column is a decreasing s ...

Can someone kindly help me to consider whether java

Can someone kindly help me to consider whether Java provides the facility of operator overloading? If it does, may you kindly describe how overloading operators can be accomplished? If not, may you kindly describe why yo ...

Applied software engineering assignment 1 -learning

Applied Software Engineering Assignment 1 - Learning outcomes - 1. Understand the notion of software engineering and why it is important. 2. Analyse the risk factors associated with phases of the software development lif ...

Assignment - method in our madnessthe emphasis for this

Assignment - "Method in our Madness" The emphasis for this assignment is methods with parameters. In preparation for this assignment, create a folder called Assign_3 for the DrJava projects for the assignment. A Cityscap ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

Assessment database and multithread programmingtasktask 1

Assessment: Database and Multithread Programming Task Task 1: Grade Processing University grading system maintains a database called "GradeProcessing" that contains number of tables to store, retrieve and manipulate stud ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Assessment socket programmingtaskwrite a java gui program

Assessment: Socket Programming Task Write a JAVA GUI program that would facilitate text chatting/exchanging between two or multiple computers over the network/internet, using the concept of JAVA socket programming. If yo ...

Assessment socket programmingtaskwrite a java gui program

Assessment: Socket Programming Task Write a JAVA GUI program that would facilitate text chatting/exchanging between two or multiple computers over the network/internet, using the concept of JAVA socket programming. If yo ...

Assessment instructionsin this assessment you will complete

Assessment Instructions In this assessment, you will complete the programming of two Java class methods in a console application that registers students for courses in a term of study. The application is written using th ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As