Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

10/9/22, 1:09 PM Assignment 3: Strings and Method Overloading https://webcourses.ucf.edu/courses/1413634/assignments/ XXXXXXXXXX/5 Assignment 3: Strings and Method Overloading Due Oct 7 by 11:59pm...

1 answer below »
10/9/22, 1:09 PM Assignment 3: Strings and Method Overloading
https:
webcourses.ucf.edu/courses/1413634/assignments/ XXXXXXXXXX/5
Assignment 3: Strings and Method Overloading
Due Oct 7 by 11:59pm Points 100 Submitting a file upload File Types java
Available until Oct 21 at 11:59pm
Start Assignment
The long awaited Strings and Method Overloading assignment. I am so
y it took me so long to post it.
I have pushed the assignment back to be turned in on a Monday. Please note the change in the date.
------
Filename: Halloween
Halloween is fast approaching and you are working at the candy factory. Your candy bars have a
wrapper that has three different things printed on it: Name of the candy, when it expires, and a slogan.
Your buddy, Jack loaded the wrong font into the document and it is printing dollar signs in random
locations of the label. Jack and you thought since it was halloween time, you could just slap some
stickers on it and call it a day.
If it is in the title, you will need two stickers for each mistake (dollar sign). If it is in the date with a
mistake, we will hide the entire thing (return empty string). However, we will leave it the same if there
isn't a mistake (dollar sign). Lastly if it is in the slogan, you will need 1 sticker for each mistake.
The sticker roll will be made up of pumpkins, bats, witches, and vampires in that order. Once the
pattern is complete it starts again with pumpkins.
Stickers:
Pumpkin
Bat
Witch
Vampire
Here are some examples:
Input Type Function Call Returns
Hallow$en Name sticker("Hallow$en") HallowPUMPKINBATen
C$$$y Name sticker("C$$$y") CPUMPKINBATWITCHVAMPIREPUMPKINBATy
Jan 2023 Date
sticker("Jan 2023",
true)
Jan 2023
10/9/22, 1:09 PM Assignment 3: Strings and Method Overloading
https:
webcourses.ucf.edu/courses/1413634/assignments/ XXXXXXXXXX/5
Jan$ 2023 Date sticker("Jan$ 2023",
true)
"" <- this is to say it is returns an empty string
Ju$t candy Slogan
sticker("Ju$t candy",
false)
JuPUMPKINt candy
Program Specifications
Create a private static variable to keep track of the cu
ent sticker you are on.
The stickers do NOT reset after each call. For example if I call sticker("Hallow$en") twice, I will get
different answers on the second call because the sticker will change. The examples above assumed
I restarted the program.
Create two public static methods called sticker. Both will return a string.
sticker(string) will assume the data is the name on the label, and find each $ and replace it with the
next two stickers on the roll. Capitalize the inserted stickers in the string.
sticker(string, boolean) will check to see if it is a date or not. If the boolean is true, then it is a date.
Otherwise it is a slogan.
Write a main method that does the following:
Asks the user what type of data, name, date, slogan or exit as a string.
Cleans the input so a user can put multiple versions and it can still work co
ectly. Examples:
"Name", "name", " name "
Asks the user what is the input.
Calls the co
ect method.
Repeats the steps above until the user types exit.
Example Run
What type of data?
name
What is the message?
Hallow$en
HallowPUMPKINBATen
What type of data?
NaMe
What is the message?
C$$$y
CWITCHVAMPIREPUMPKINBATWITCHVAMPIREy
What type of data?
DatE
What is the message?
Oct 2022
Oct 2022
What type of data?
Date
What is the message?
Dec $ 2022
What type of data?
slogan
What is the message?
UCF stands for opportunity$
UCF stands for opportunityPUMPKIN
10/9/22, 1:09 PM Assignment 3: Strings and Method Overloading
https:
webcourses.ucf.edu/courses/1413634/assignments/ XXXXXXXXXX/5
Some Ru
ic (1)
What type of data?
Exit
10/9/22, 1:09 PM Assignment 3: Strings and Method Overloading
https:
webcourses.ucf.edu/courses/1413634/assignments/ XXXXXXXXXX/5
Criteria Ratings Pts
5 pts
5 pts
10 pts
35 pts
Does it run?
Does it run without e
or?
5 pts
Yes
0 pts
No
Include Header Comment?
Did you include header comment?
(Name, Date, Class, Assignment
title)
5 pts
Yes
0 pts
No
Static Variables
Did you create a static variable to
keep track of which sticker you are
on?
10 pts
Yes
0 pts
No
Sticker(String) Method
Does the sticker do the following?
1. Written co
ectly? (Returns a
string, takes in a string)
2. Locate at least one $
3. Replace the $ with two of the
keywords from the list
4. Keywords were selected based
on the rotation
5. Builds a new word based on this
information co
ectly
6. Returns a constructed word
35 pts
Yes
29 pts
5/6
22 pts
4/6
15 pts
3/5
0 pts
No
2 or less things
accomplished.
10/9/22, 1:09 PM Assignment 3: Strings and Method Overloading
https:
webcourses.ucf.edu/courses/1413634/assignments/ XXXXXXXXXX/5
Total Points: 100
Criteria Ratings Pts
45 pts
Sticker(String, boolean) Method
Does the sticker do the following?
1. Written co
ectly? (Returns a
string, takes in a string and boolean)
2. Locate at least one $
3. If slogan replace the $ with one of
the keywords from the list
4. Keywords were selected based
on the rotation
5. Builds a new word based on this
information co
ectly
6. Returns a constructed word
7. If date return the date if no $ is
located
8. Return an empty string if the date
has a $
45 pts
Yes
39 pts
7/8
33 pts
6/8
27 pts
5/8
20 pts
4/8
0 pts
No
3 or less
things
accomplished.

10/9/22, 1:11 PM Assignment 4: File I/O & Linked Lists
https:
webcourses.ucf.edu/courses/1413634/assignments/ XXXXXXXXXX/2
Assignment 4: File I/O & Linked Lists
Due Oct 21 by 11:59pm Points 100 Submitting a file upload File Types java
Available until Nov 4 at 11:59pm
Start Assignment
Goal:
Our goal is to use a Linked List Class (JavaDoc
(https:
docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/LinkedList.html) ). You must use the
Linked List Object and not write your own.
Prompt
You are working in a store with two different lines to help people. One of these lines is for people who
just want to check out, the other is for people who want to return an item. In most retail situations, the
user will get into the checkout line and then told they need to join the customer service line once they get
up front. Your job is to simulate these two lines.
The store will process 2 purchases for every 1 return. This will be made clear in the example.
Code Requirements
There will be two classes. Store and Customer.
Customer Class
Includes name (String) and if they are buying (False) or returning (True)
Includes a constructor that takes in a String and a boolean. (See variables)
Includes two instance methods to return the name (getName()) and if they are returning
(getBusiness())
Store Class
Includes two static LinkedLists that store Customers
Includes a main method
Ask the user what is the name of the file they would like to load. Assume the file is in the root
directory.
Main method reads information from the file. Each customer will be in one line.
Load everyone in the file into the checkout line.
Each cycle do the following:
Take out two people out of the checkout line.
If they are buying print "Name checkout"
If they are returning print "Name forwarded to return line"
https:
docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/LinkedList.html
10/9/22, 1:11 PM Assignment 4: File I/O & Linked Lists
https:
webcourses.ucf.edu/courses/1413634/assignments/ XXXXXXXXXX/2
If they are returning also put them in the return line.
Take out one person out of the return line. Print out "Name returned an item"
Example:
Text File:
5
John true
Sally false
Sarah false
Ray true
Juan true
The output should be:
John was forwarded to the return line.
Sally checked out
John returned an item
Sarah checked out
Ray was forwarded to the return line.
Ray returned an item
Juan was forwarded to the return line.
Juan returned an item
Answered 8 days After Oct 09, 2022

Solution

Vibhav answered on Oct 18 2022
54 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here