Giter Club home page Giter Club logo

cs.11.02.quiz.2.1's Introduction

Ensure that you read all instructions carefully.

You will implement each of the four methods outlined below. All four methods will be written inside the provided Main class beneath the appropriate comment. Declare all methods as static.

For each method that you write, call your method inside the main method by storing the returned value into a variable and then printing out the contents of that variable. The single line comments inside the main method provide instructions on how to do so.

Once you have finished, commit and push your code to Github, inspect your repository to see that your code was successfully pushed, and submit the link to your Github repository on Schoology.

Good luck, have fun!

Write a method called add. This method will have two parameters called numOne and numTwo, both of type int. This method will add the two numbers together and return the result (an integer). Call this method inside the main method and store the result in a variable called resultOne. Print this variable using the println statement.

Write a method called greeting. This method will have one parameter called name of type String. This method will return a string of the format “Bonjour, [name]!”. Call this method inside the main method and store the result in a variable called resultTwo. Print this variable using the println statement.

Write a method called add. This method will have four parameters called numOne, numTwo, numThree, and numFour. This method will add the four numbers together and return the result. However, it will not add the numbers together like numOne + numTwo + numThree + numFour, but instead it will call the add method that you created in question 1 thrice to compute the sum of the four numbers and return that result (an integer). Call this method inside the main method and store the result in a variable called resultThree. Print this variable using the println statement.

Write a method called printCapitalised. This method will have one parameter called toBePrinted. This method will simply print the content that was passed to the method in all capital letters. Call this method inside the main method.

cs.11.02.quiz.2.1's People

Contributors

techarenz avatar renee-lui 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.