PRG420 Java Programming I
Need Help in PRG/420 Java Assignments?
We can help you if you are having difficulty with your PRG420 Assignment. Just email your assignments at support@assignmentcache.com.
We provide help for students all over the world.
-
PRG/420 Week 1 Java 1.13 LAB: Input and formatted output: Right-facing arrow
Regular Price: $5.00
Special Price $3.00
PRG/420 Week 1 Java 1.13 LAB: Input and formatted output: Right-facing arrow
Given two input integers for an arrowhead and arrow body, print a right-facing arrow.
Ex: If the input is:
0 1the output is:
Learn More
1
11
00000111
000001111
00000111
11
1 -
PRG/420 Week 1 Java 1.29 LAB: Expression for calories burned during workout
Regular Price: $5.00
Special Price $3.00
PRG/420 Week 1 Java 1.29 LAB: Expression for calories burned during workout
The following equations estimate the calories burned when exercising (source):
Women: Calories = ( (Age * 0.074) - (Weight * 0.05741) + (Heart Rate * 0.4472) - 20.4022 ) * Time / 4.184
Men: Calories = ( (Ago * 0.2017) - (Weight * 0.09036) + (Heart Rate * 0.6309) - 55.0969 ) * Time / 4.184Write a program using inputs age (years), weight (pounds), heart rate (beats per minute), and time (minutes), respectively.
Output calories burned for women and men.
Output each floating-point value with two digits after the decimal point, which can be achieved as follows:
System.out.printf("%.2f", yourValue))Ex: If the input is:
Learn More
49 155 148 60
the output is:
Women: 580.94 calories
Men: 891.47 calories -
PRG/420 Week 1 Java 1.30 LAB: Mad Lib
Regular Price: $8.00
Special Price $3.00
PRG/420 Week 1 Java 1.30 LAB: Mad Lib
Mad Libs are activities that have a person provide various words, which are then used to complete a short story in unexpected (and hopefully funny) ways.
Complete the program to read the needed values from input, that the existing output statement(s) can use to output a short story.Ex: If the input is:
Eric Chipotle 12 carsthe output is:
Learn More
Eric went to Chipotle to buy 12 different types of cars. -
PRG/420 Week 1 Java 1.31 LAB: Phone number breakdown
Regular Price: $8.00
Special Price $3.00
PRG/420 Week 1 Java 1.31 LAB: Phone number breakdown
Given a long integer representing a 10-digit phone number, output the area code, prefix, and line number using the format (800) 555-1212.
Ex: If the input is:
8005551212
the output is:
(800) 555-1212Hint: Use % to get the desired rightmost digits. Ex: The rightmost 2 digits of 572 is gotten by 572 % 100, which is 72.
Learn More
Hint: Use / to shift right by the desired amount. Ex: Shifting 572 right by 2 digits is done by 572 / 100, which yields 5. (Recall integer division discards the fraction).
For simplicity, assume any part starts with a non-zero digit. So 0119998888 is not allowed. -
PRG/420 Week 2 Java 2.18 LAB: Warm up: Text message abbreviation decoder
Regular Price: $7.00
Special Price $3.00
PRG/420 Week 2 Java 2.18 LAB: Warm up: Text message abbreviation decoder
(1) If a user's input string matches a known text message abbreviation, output the unabbreviated form, else output: Unknown. Support two abbreviations: LOL -- laughing out loud, and IDK -- I don't know. (4 pts)
Sample input/output:
Input an abbreviation:
LOL
laughing out loud(2) Expand to also decode these abbreviations. (3 pts)
Learn More
BFF -- best friends forever
IMHO -- in my humble opinion
TMI -- too much information -
PRG/420 Week 2 Java 2.19 LAB: Smallest number
Regular Price: $7.00
Special Price $3.00
PRG/420 Week 2 Java 2.19 LAB: Smallest number
Write a program whose inputs are three integers, and whose output is the smallest of the three values.
Ex: If the input is:
Learn More
7 15 3
the output is:
3 -
PRG/420 Week 2 Java 2.20 LAB: Interstate highway numbers
Regular Price: $7.00
Special Price $3.00
PRG/420 Week 2 Java 2.20 LAB: Interstate highway numbers
Primary U.S. interstate highways are numbered 1-99. Odd numbers (like the 5 or 95) go north/south, and evens (like the 10 or 90) go east/west Auxiliary highways are numbered 100-999, and service the primary highway indicated by the rightmost two digits. Thus, I-405 services I-5, and I-290 services I-90.
Given a highway number, indicate whether it is a primary or auxiliary highway. If auxiliary, indicate what primary highway it serves. Also indicate if the (primary) highway runs north/south or east/west.Ex: If the input is:
90
the output is:
I-90 is primary, going east/west.
Ex: If the input is:
290
the output is:
I-290 is auxiliary, serving I-90, going east/west.
Ex: If the input is:
0
or any number not between 1 and 999, the output is:
0 is not a valid interstate highway number.See Wikipedia for more info on highway numbering.
Learn More -
PRG/420 Week 2 Java 2.21 LAB: Seasons
Regular Price: $7.00
Special Price $3.00
PRG/420 Week 2 Java 2.21 LAB: Seasons
Write a program that takes a date as input and outputs the date's season. The input is a string to represent the month and an int to represent the day.
Ex: If the input is:
April 11
the output is:
Spring
In addition, check if the string and int are valid (an actual month and day).Ex: If the input is:
Blue 65
the output is:
InvalidThe dates for each season are:
Learn More
Spring: March 20 - June 20
Summer: June 21- September 21
Autumn: September 22 - December 20
Winter: December 21 - March 19 -
PRG/420 Week 2 Java 2.22 LAB: Exact change
Regular Price: $7.00
Special Price $3.00
PRG/420 Week 2 Java 2.22 LAB: Exact change
Write a program with total change amount in pennies as an integer input, and output the change using the fewest coins, one coin type per line. The coin types are Dollars, Quarters, Dimes, Nickels, and Pennies. Use singular and plural coin names as appropriate, like 1 Penny vs. 2 Pennies.
Ex: If the input is:
0
the output is:
No changeEx: If the input is:
Learn More
45
the output is:
1 Quarter
2 Dimes -
PRG/420 Week 2 Java 2.23 LAB: Leap Year
Regular Price: $7.00
Special Price $3.00
PRG/420 Week 2 Java 2.23 LAB: Leap Year
A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate around the sun. To account for the difference in time, every 4 years, a leap year takes place. A leap year is when a year has 366 days: An extra day, February 29th. The requirements for a given year to be a leap year are:
1) The year must be divisible by 4
2) If the year is a century year (1700, 1800, etc.), the year must be evenly divisible by 400
Some example leap years are 1600, 1712, and 2016.Write a program that takes in a year and determines whether that year is a leap year.
Ex: If the input is:
1712
the output is:
1712 is a leap year.Ex: If the input is:
Learn More
1913
the output is:
1913 is not a leap year.