Explore BrainMass

Explore BrainMass

    Java Script for a Specific Age Calculation

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Create a simple age calculator to determine if a user is allowed to purchase a particular restricted product. Model an abstract class to represent the generic restricted product and concrete classes to represent alcohol, tobacco, R-rated movies, PG-13 rated movies and video games. Each of these products have a different minimum age for purchase. The age calculator user interface will be a Java Swing application that instantiates the product selected by the user and compares its minimum purchase age with the birthdate of the customer. If the customer is old enough to purchase the product a dialog box to that effect appears. A rejection message is displayed if the customer is too young.

    © BrainMass Inc. brainmass.com October 9, 2019, 9:14 pm ad1c9bdddf

    Solution Summary

    This solution provides guidelines to create an age calculator on Java Script to determine whether customers are eligible to purchase certain products (e.g. R-rated movies, video games, tobacco...etc).