← Back to Home

Sprint Challenge - BD Unit 1 Sprint 1

Overview

Sprint challenges are a way for you to demonstrate that you have mastered the skills you learned this week. The sprint challenge will test you on each of the week's objectives. If you want to spend some more time preparing for the sprint challenge this week, below you will find a list of notes and challenges to give you more practice with the objectives we have covered.

What to Expect in the Sprint Challenge

The Sprint Challenge will assess your understanding of the key concepts covered in this unit's modules:

The challenge will involve practical coding tasks that require you to apply these concepts to solve real problems. You'll need to demonstrate your ability to write, test, and debug Java code using the tools and techniques covered in the modules.

Tips for Success

Setup & Resources

GitHub Repository

Additional Resources

Study Guide

Command-line and IDE Basics

  • Navigate a command-line shell using basic commands (pwd, ls, cd, clear)
  • Work with directories and files (mkdir, touch, rm)
  • Use your IDE (IntelliJ) to develop code locally

Git Basics

  • Fork and clone repositories
  • Use git add, commit, and push to manage your changes
  • Create and work with branches
  • Create pull requests to propose changes

Variables, Console Output, and Arithmetic Operations

  • Declare variables of the correct types to store primitive data
  • Implement code to write output to the console
  • Calculate the result of basic and compound arithmetic expressions
  • Cast to floating point type to preserve precision when dividing integers

Strings, User Input, and Comments

  • Work with String objects and their methods
  • Implement code to receive input from the user through the console
  • Write code comments to describe functionality
  • Format strings and concatenate values

Detailed Review by Topic

Command-line and IDE Basics

Git Version Control

Java Fundamentals

Key Code Examples to Review

// Variable declaration and initialization
int count = 10;
double price = 29.99;
String name = "Java";

// Arithmetic with type casting
double result = (double) count / 3;  // 3.33... not 3

// String manipulation
String greeting = "Hello, " + name + "!";
String lowercase = greeting.toLowerCase();
boolean containsHello = greeting.contains("Hello");

// Console input/output
System.out.println("Enter your name:");
Scanner scanner = new Scanner(System.in);
String userName = scanner.nextLine();
System.out.println("Welcome, " + userName + "!");

Using Git with Sprint Project

Clone Project

Open the project with Github classroom, copy the url, and use git clone to bring it down to your machine.

Create Branches

Each Sprint should be worked on with a separate branch. It is recommended you branch off of main into a new branch, sprint-1, and complete all of the mastery tasks in order for sprint-1. When finished you may choose to merge sprint-1 onto main or not. Create a new branch off of either sprint-1 or main(only if you merged onto main) called sprint-2 for work on the second set of mastery tasks. Repeat for sprint-3.

Pushing Branches

Each Sprint should have its own branches. As you push changes, make sure they are being pushed to the correct branches on GitHub.

Sprint Project Workflow

Here's a step-by-step guide to working on your sprint project:

Initial Setup

# Clone the repository
git clone https://github.com/your-username/bd-java-fundamentals-project.git
cd bd-java-fundamentals-project

# Create a branch for sprint-1
git branch sprint-1
git checkout sprint-1

Working on Tasks

  1. Complete each mastery task in the order they're presented
  2. Regularly commit your changes with descriptive messages:
    git add .
    git commit -m "Complete Task 1: Add variable declarations"
  3. Push your changes to your branch:
    git push --set-upstream origin sprint-1

Working on Multiple Sprints

When you're ready to move to the next sprint:

# Option 1: Create sprint-2 from sprint-1
git checkout sprint-1
git branch sprint-2
git checkout sprint-2

# Option 2: Create sprint-2 from main
git checkout main
git branch sprint-2
git checkout sprint-2

Submission Tips