Question
Exercise 6.67 Thereis a rumor circulating on the Internet that George Lucas (the creator ofthe Star Wars movies) uses a formula to create the names
Exercise 6.67 Thereis a rumor circulating on the Internet that George Lucas (the creator ofthe Star Wars movies) uses a formula to create the names for the characters in his stories (JarJar Binks, ObiWanKenobi, etc.). The formulaallegedlyis this:Your Star Wars first name:1 Take the first three letters of your last name.2 Add to that the first two letters of your first name.Your Star Wars last name:1 Take the first two letters of your mothers maiden name.2 Add to this the first three letters of the name of the town or city where you were born.And now your task: Create a new BlueJ project namedHW03-2Weissman[use your name!]. In it create a class namedNameGenerator. This class should have a method named generateStarWarsName()thatgenerates a Star Wars name, following the method described above. You will need to investigatea method of the String class that generates a substring.
please show code the above in bluej
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started