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
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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F4eca6402-bf16-4ab3-b4a7-bffc058f8485%2Fef72ca25-9937-4d09-be10-4c7461f7007f%2F8nlbkns_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 2 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)