Notes
Notes - notes.io |
The class should store two Strings. One to represent the text on the license plate and one to store the two character abbreviation of the state. If you looked at my car, for example, you would see that the text is "7RWD633", and it is a California plate, so the state would be "CA".
Give your class setters and getters for these two fields with the following names:
getText, setText
getState, setState
The class should also have a two argument constructor that accepts two String references. The first for the text, and the second for the state.
In the setters and the constructor you can assume that the arguments are suitable String values. No need to check to make sure that the state strings are two character strings, for example.
The class should also have these two methods:
A method named "equals" that accepts a LicensePlate as an parameter and returns true if the argument's text and state match the receiving objects text and state. If they are not the same it should return false.
A method named "toString" that accepts no arguments, and returns a single string that contains the text and state. The exact format of this string is up to you.
Only write the class. Do not write a complete program. Do not include a main method.
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team
