KIT 1 01 Programming Fundamentals Solved

$ 29.99
Category:

Description

PP Task 3.2 Fill in the Blanks

Overview

Purpose: Learn how to declare variables, assign them values, use them in expressions and format a message to the user.
Task: Follow the instructions to create a short sports reporting program. Submit to MyLO when complete.
Learning Outcomes: 3’•
Time: Complete during your tutorial and submit for feedback before the start of Week 4.
Resources: • Introductory Programming Notes:
0 04 Working with Primitive Data (and Strings)
0 05 Using Objects
Online Mini-lectures:
Solving Problems with Computers:
* Using ‘primitive’ data
Some commonly used objects
Submission Details
Upload the following to the MyLO submission folder for this task:
Your SportsReport.java source file
A screenshot showing the execution of your SportsReport program
Assessment Criteria
A Completed submission will:
Prompt for and read the required details from the user
Output the message according to the given template
Follow the unit’s coding style for layout, variable names (use of case), and commenting (including your name at the top) Compile, with the screenshot showing that it works
Have the appropriate variables, and use them appropriately
Instructions

With almost all competitive team sport cancelled or put on hold the public is desperate for a replacement. Scientists have determined that the actual game doesn’t matter,_l as long as a sports fan can have a team they support and outcomes to feel good or bad about. You are to write a short sports news program that produces stories about the outcome from a single game in some (unnamed) sport to satisfy this need.
1 . Create a new program with the following code as a starting point:
import java. util. Scanner;
* 3.2PP Sports News Generator
@author Replace with your name public class SportsReport {
public static void main(String[] args) {
Scanner sc — new Scanner(System.in);
System. out. print1n(“Any Sport in a Storm”
System. out . println();
System. out. print(“Enter the winning team’ s name: winner = sc.nextLine();
System. out. print(“What round of the competition? round – sc.nextlnt();
2. Modify the program so that it implements the following algorithm. You will need to declare additional variables, prompt for and read their values from the user, and produce three formatted lines of output at the end.
Program: SportsReport
Variables:
Scanner sc
Steps:
1. Create Scanner sc
2. Display the title of the program: “Any Sport in a Storm”
3 . Prompt for winning team’ s name and store in winner
4. Prompt for losing team’s name and store in Loser
5 . Prompt for the competition round and store in round
6. Prompt for points scored by the winning team and store in winnerPoints
7. Prompt for points scored by the losing team and store in LoserPoints
8. Calculate their point difference as winnerPoints LoserPoints and store in difference
9. Display the following formatted messages, where each highlighted entry represents that variable’s value:
winner beat Loser by difference points at the weekend in a thrilling game.
The final score line was winnerPoints points to LoserPoints .
After just round rounds winner look like favourites to win the competition.
3. Optional: Change the displayed title of the program to something other than ‘Any Sport in a Storm’.
4. Test your program with a variety of inputs to ensure it works as it should.
5. Take a screenshot of one run of your program and upload both the SportsReport.java source file and screenshot to the assignment submission folder on MyLO.

1 . They have not. This is fake news, but seems pretty close to reality.e

Reviews

There are no reviews yet.

Be the first to review “KIT 1 01 Programming Fundamentals Solved”

Your email address will not be published. Required fields are marked *