java language A system needs to have a Validation class that can validate the input for instance variables of the different classes given in Table 1. It should validate the values for the data members from different classes using Regular Expressions, such that a name can only contain alphabets from A to Z or a to z and the first letter is always a capital letter. The address should start with a number followed by one or two words (for example 16 Khyber or 16 Khyber Ave). The phone number should have a format like 0-000-0000000 where the first digit is always a 0. The e-mail address should contain exactly one ‘@’ character and at least one ‘.’ character. A car’s registration number can only contain a maximum of 3 English alphabets followed by not more than 4 digits. All the classes should be able to validate their data without creating the objects

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

java language

A system needs to have a Validation class that can validate the input for instance variables of
the different classes given in Table 1. It should validate the values for the data members from different classes
using Regular Expressions, such that a name can only contain alphabets from A to Z or a to z and the first
letter is always a capital letter. The address should start with a number followed by one or two words (for
example 16 Khyber or 16 Khyber Ave). The phone number should have a format like 0-000-0000000 where the first digit is always a 0. The e-mail address should contain exactly one ‘@’ character and at least one ‘.’
character. A car’s registration number can only contain a maximum of 3 English alphabets followed by not
more than 4 digits. All the classes should be able to validate their data without creating the objects

Table 1:
Class
Attributes
name, registration number, engine number, chassis number, city of registrat
make and model, color, the date of the registration, price, the date of arrival of
car to the dealership, type of the vehicle, and whether the car is sold or not.
dealer's name, dealer's id, dealer's address, and the dealer's phone number.
dealer object also keeps track of the cars that the dealer has.
A person has a name, address, phone number and e-mail address.
Car
Dealer
Person
Transcribed Image Text:Table 1: Class Attributes name, registration number, engine number, chassis number, city of registrat make and model, color, the date of the registration, price, the date of arrival of car to the dealership, type of the vehicle, and whether the car is sold or not. dealer's name, dealer's id, dealer's address, and the dealer's phone number. dealer object also keeps track of the cars that the dealer has. A person has a name, address, phone number and e-mail address. Car Dealer Person
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education