Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

Problem 1.

An application tracks the amount that account 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 a 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.

Problem 2.

A library has many type of materials to lend to patrons. Books, videos and DVDs are three types of these materials. All three have titles, but books have an author while videos and DVD have a director. Each can be lent out to a partron for 10 days (books) or 20 days (videos or DVDs).

Make classes for the types of material along with a method that posts when the material was borrowed. That method should take a date and add the appropriate number of days and determine the due date properly of the material. The textbook covers date handling. Date is a class with specific properties and methods.

In addition to the classes, write some code in a main method that creates media, has them borrowed by patrons and correctly tracks the due date.

Java, Programming

  • Category:- Java
  • Reference No.:- M92406622
  • Price:- $10

Priced at Now at $10, Verified Solution

Have any Question?


Related Questions in Java

Operating systems assignment -problem 1 sharing the bridgea

Operating Systems Assignment - Problem 1: Sharing the Bridge A new single lane bridge is constructed to connect the North Island of New Zealand to the South Island of New Zealand. Farmers from each island use the bridge ...

Project descriptionwrite a java program to traverse a

Project Description: Write a java program to traverse a directory structure (DirWalker.java) of csv files that contain csv files with customer info. A simple sample in provided in with the sample code but you MUST will r ...

Object-oriented software development1 introduction 11

OBJECT-ORIENTED SOFTWARE DEVELOPMENT 1. Introduction 1.1 Assignment Requirement 1.2 Deliverables and Structure (what to submit) 1.3 Software Restrictions 1.4 How to score high... 1.5 Assumptions 2. System Requirements 2. ...

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 instructionsin this assessment you will design

Assessment Instructions In this assessment, you will design and code a simple Java application that defines a class, instantiate the class into a number of objects, and prints out the attributes of these objects in a spe ...

Question slideshows or carousels are very popular in

Question : Slideshows (or carousels) are very popular in websites. They allow web developers to display news or images on the website in limited space. In this code challenge, you are required to complete the JavaScript ...

Fundamentals of operating systems and java

Fundamentals of Operating Systems and Java Programming Purpose of the assessment (with ULO Mapping) This assignment assesses the following Unit Learning Outcomes; students should be able to demonstrate their achievements ...

In ruby the hash class inherits from enumerable suggesting

In Ruby, the Hash class inherits from Enumerable, suggesting to a programmer that Hashes are collections. In Java, however, the Map classes are not part of the JCF (Java Collections Framework). For each language, provide ...

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 ...

Answer the following question whats the difference public

Answer the following Question : What's the difference public inheritance and private inheritance? What can derived classes inherit from base classes? What cannot be inherited from base classes?

  • 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