Question
1. In Eclipse, create a new Java project named asg1Sp22 2. In the project, create a new package named asg1 (all lowercase letters). Part 1
1. In Eclipse, create a new Java project named asg1Sp22 2. In the project, create a new package named asg1 (all lowercase letters).
Part 1 1. Create a new class INSIDE of package asg1, name the new class Asg1Part1. 2. Inside of the class, Asg1Part1, write a main method that computes the sum of the numbers from 99 to 350 using an increment of 7. Print that sum with a message. (Do this programmatically,, not one long addition string) 3. Run the main method (run class Asg1Part1). Check that the output is correct. 4. Inside of class Asg1Part1, add additional code to the main method to ALSO sum the numbers from 2500 to 3500 that are evenly divisible by 23. Print that sum with a message. 5. Run the class Asg1Part1 (main method in that class). Check that the output is correct. 6. Add more code to the main method in class Asg1Part1, to compute the "sum of the squares" of all the numbers from 7 to 67, i.e.7*7 + 8*8 + 9*9... +67*57. Print the sum with a message. 7. Run the main method for Asg1Part1. Capture the console output. (Now output should include all the sums from previous parts.) 8. Put the program code (from class Asg1Part1) and console output of final run with all added code at the end of your text file, asg1pt1-yourSEUusername.txt. Part 2
1. In the package asg1, create a new class named WordGame. 2. Write a program that plays a word game with the user. The program should ask the user to enter the following:
A boy name An age The name of a city A girl name The name of a country A food or dish A type of animal
3. After the user has entered these items, the program should display the following story, inserting the users input into the appropriate locations:
There once was this boy named BOYNAME. He was AGE years old. His family resides in the special town of CITY. One day, BOYNAME met this amazing girl named GIRLNAME. It was always a dream of BOYNAME's to take GIRLNAME to COUNTRY. He would cook GIRLNAME his favorite dish, FOOD and after dinner they would ride ANIMAL into the sunset.
4. Prompts And Output Labels: There are no labels here but the prompts should simply be (respectively) "Enter a boy's name: ", "Enter an age: ", "Enter the name of a city: ", "Enter a girl's name: ", "Enter country: ", "Enter a type of animal: ". Note that each prompt ends with a ":" followed by one space and is displayed so that the response will appear on the same line as the prompt itself.
5. Input: Keep in mind that the input responses to the prompts may consist of multiple words. For example, name might be "Joseph Gordon-Levitt".
6. CLASS NAMES. Your program class should be called WordGame 7. Identify three sets of inputs. Run all three sets.
8. Capture the output from the console (for *ALL* of the runs) and put it and your Java program code (all of the code in class Asg1) into a text file (save the file (asg1pt2-yourSEUusername.txt)).
Upload to Canvas 1 single text file, asg1-yourSEUusername.txt, containing ALL of following:
9. As noted above, include your name and assignment number at the top of the text file. 10. Captured console output (as instructed) and all Java code from each section above, each set of test data, all neatly copied into the text file,
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