subject

An application tracks the amount that accounts owed for tolling charges. These charges are accrued when crossing a bridge. There are 3 types of accounts: one for cars, one for trucks and one for emergency vehicles. Cars have a person owner with a first and last name, a license plate, and an account number. When a car crossed a bridge the charge is $5. Trucks have a corporation owner, a license plate, and an account number. When a truck crosses the bridge, it is charged $3 per axle. Emergency vehicles are also in the system but cross the bridge for free. These emergency vehicles have a government owner, an account number, and a license plate. Make classes for all types of vehicles, with all properties mentioned, using inheritance when possible. Each class should have a method that can be called when the vehicle crosses the bridge. The method should keep track of how much the account owes.
In addition to the classes, write some code in the main method that creates some vehicles, post some tolls, and prints out their account balance. Your main method code should verify that the method called for each crossing accurately keeps the account balance.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
Some of your friends have gotten into the burgeoning field of time-series data mining, in which one looks for patterns in sequences of events that occur over time. purchases at stock exchanges"what's being bought" are one source of data with a natural ordering in time. given a long sequence s of such events, your friends want an efficient way to detect certain "patterns" in them"for example, they may want to know if the four events buy yahoo, buy ebay, buy yahoo, buy oracle occur in this sequence s, in order but not necessarily consecutively. they begin with a collection of possible events (e.g., the possible transactions) and a sequence s of n of these events. a given event may occur multiple times in s (e.g., yahoo stock may be bought many times in a single sequence s). we will say that a sequence s is a subsequence of s if there is a way to delete certain of the events from s so that the remaining events, in order, are equal to the sequence s . so, for example, the sequence of four events above is a subsequence of the sequence buy amazon, buy yahoo, buy ebay, buy yahoo, buy yahoo, buy oracle their goal is to be able to dream up short sequences and quickly detect whether they are subsequences of s. so this is the problem they pose to you: give an algorithm that takes two sequences of events"s of length m and s of length n, each possibly containing an event more than once"and decides in time o(m + n) whether s is a subsequence of s.
Answers: 3
question
Computers and Technology, 21.06.2019 22:50
Explain why it is reasonable to assume that receiving 3 duplicate acks in tcp is an indication that the network is not currently congested.
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
Select all that apply. which of the following are proofreading options included in microsoft word? spell check find replace grammar check formatting check
Answers: 1
question
Computers and Technology, 23.06.2019 00:30
Quic which one of the following is the most accurate definition of technology? a electronic tools that improve functionality b electronic tools that provide entertainment or practical value c any type of tool that serves a practical function d any type of tool that enhances communication
Answers: 1
You know the right answer?
An application tracks the amount that accounts owed for tolling charges. These charges are accrued w...
Questions
question
Mathematics, 07.01.2021 03:10
question
Mathematics, 07.01.2021 03:10
question
Chemistry, 07.01.2021 03:10
question
Mathematics, 07.01.2021 03:10
Questions on the website: 13722361