(20 points total) You and a few friends decide to start a band. You already agreed on the music style
(neoclassical jazzhopmetal, it’s pretty experimental), but you have yet to decide on the most important
thing: a band name. Since the band name is very important and to exploit your newly-acquired
knowledge in Java, you proposed to create a band name generator in Java.You agree that the name must consist of two adjectives followed by a noun, which is a common
combination for neoclassical jazzhopmetal band names. So, an example could be ‘Charming Chubby
Cat’.(15 points) To implement the band name generator, you have to complete the
BandNameGenerator.java file (see the file on eClass). Make sure that it compiles and runs
without errors and warnings.Some notes/hints:
– You are free to add fields/methods as needed. Make sure that you do not change the signatures of the
methods that are already defined – we will deduct points if you do so.
– Use the provided nouns.txt and adjectives.txt files for a large list of nouns and adjectives.– Because we have not discussed reading/writing files yet, a method loadTxt() is provided that loads a
txt file into an array of String objects. The txt file is assumed to contain the total number of rows on the
first line, and one word per line in the rest of the file. You are not allowed to change this method, and
you can use it following assignments as well for loading text files.– You can create a random number by calling Math.random(). See for more information the docs
(https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Math.html)
– Print 20 randomly generated names (no more, no less).
– Every word in your band name should start with an uppercase letter and contain only lowercase letters
after that. So, e.g., ‘CHARMING chubby Cat’ would become ‘Charming Chubby Cat’.(5 points total) Please answer these questions about the implementation/design choices. There is no
need to change your implementation based on these questions, a textual explanation is fine.*
(3 points) 1. Why do the adjectives and nouns files contain the total number of words on the first
line? What would happen if we tried to load a file that does not contain this number? What
would need to change in the code to avoid this problem?(2 points) 2. As you may have noticed, it is quite easy to generate a band name that can be
considered inappropriate. Since you would like to tell your grandparents about your band too,
you prefer an appropriate name. How would you go about making sure that the generated name
is appropriate? What are some of the challenges that come with doing so?
* Of course, if you want to implement them please go ahead! It is great practice.
** Thanks to GitHub user hugsy for providing the adjectives and nouns files.Please submit:
1) A zip file containing your code and a PDF with the answers to the questions above.
Name the file ‘FirstName_ID_lab_asg1.zip’ and keep the exact same file structure as the zip that was
provided for the assignment. So, for example:
Filename: Cor-Paul_1234567_lab_asg1.zip
|——- solution.pdf
|——- adjectives.txt
|——- nouns.txt
|——- src
| |——- ece325
| | |——- labs
| | | |——- lab1
| | | | |——- *.java
2) A screencast/movie that shows the following steps:
• Open your eClass with your name shown
• Open your IDE
• Show your code briefly
• Execute your code and demonstrate that your class works correctly.
Please submit the screencast as a separate file to eClass. No screencast = -5 points.
Please do not modify any of the names/methods we’ve defined in the provided *.java files.
Assignment, band, Generating, Name, solved, your
[SOLVED] Ece 325 lab assignment 1: generating the name of your band
$25
File Name: Ece_325_lab_assignment_1__generating_the_name_of_your_band.zip
File Size: 546.36 KB
Categories: Assignment, band, Generating, Name, solved, your
Tags: Assignment, band, Generating, Name, solved, your
Only logged in customers who have purchased this product may leave a review.
Reviews
There are no reviews yet.