Giter VIP home page Giter VIP logo

java-lab-002's Introduction

Java-Lab-002

Variables, Types and Operators

Be able to explain what variables are. Understand variable types, allowed names, and valid values. Know how to create and use string, integer, floating-point, and boolean variables.

Part 1 - LikeAGirl.java - Like a Girl

The lab template contains a program that prints the following if you choose "0":

What does it mean to do something, "Like a Girl"?
Show me what it looks like to run, "Like a Girl."
Show me what it looks like to fight, "Like a Girl."
How do you think it affects them when somebody uses "Like a Girl" as an insult? Choice (good: 0, bad: 1) 0
You answered 0
Always wants to change that.
Emotional Damage 100.000000.
Did you answer like a nice person? FALSE

... OR the following if you choose "1":

What does it mean to do something, "Like a Girl"?
Show me what it looks like to run, "Like a Girl."
Show me what it looks like to fight, "Like a Girl."
How do you think it affects them when somebody uses "Like a Girl" as an insult? Choice (good: 0, bad: 1) 1
You answered 1
Good for you.
Emotional Damage 0.000000.
Did you answer like a nice person? TRUE

Ignore the code that you don't fully recognize and concentrate on changing the variables to alter the script to say the following if 1 is chosen:

What does it mean to do something, "Like a Boy"?
Show me what it looks like to run, "Like a Boy."
Show me what it looks like to fight, "Like a Boy."
How do you think it affects them when somebody uses "Like a Boy" as an insult? Choice (good: 1, bad: 2) 1
You answered 1
Good for you.
Emotional Damage 50.000000.
Did you answer like a nice person? TRUE

OR to say the following if 2 is chosen:

What does it mean to do something, "Like a Boy"?
Show me what it looks like to run, "Like a Boy."
Show me what it looks like to fight, "Like a Boy."
How do you think it affects them when somebody uses "Like a Boy" as an insult? Choice (good: 1, bad: 2) 2
You answered 2
Always wants to change that.
Emotional Damage 100.000000.
Did you answer like a nice person? FALSE

Part 2 - Interpretation

Take note of the various variables and their data types. Write a brief summary in this section of the README.md file listing the:

  • Variable name
  • Its data type
  • and example values you can assign them.

Next give TWO example variable names and TWO example variable assignments that are WRONG and explain why.

  • Hint: your IDE can help you discover wrong assignments or variable names!

Part 3 - Bonus: Play around with Java String Format Specifiers.

Pick several of the Java format specifiers below and define variables of the correct type utilize sout and String.format to view the resulting formats.

Format Specifiers

Part 4 - Submission

  • Just as you did last week (Reference the Lab video in your Week 1 module), create a Feature1 branch of your code
  • Commit your working code to your local copy
  • Push it to your Remote/origin branch (i.e. GitHub: Feature1 -> origin/Feature1)
  • Then issue a Pull request to my instructor branch
    • Make sure to COPY the Pull request URL and submit it for the lab/assignment.

java-lab-002's People

Contributors

viable-hartman avatar thartmanoftheredwoods avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.