Extra Strength Methods.

  1. Firstly figure out what the class is supposed to do.
  2. Should be list instance variables and methods.
  3. Next write a pre code for methods
  4. Write test code for methods.
  5. Implement the class
  6. Test the methods.
  7. Debug and reimplement as needed.
Pseudo Code
Test code
real code

Converting String to Int,

Converting String to int

Random and getUserInput(),

  • Make a random Number.
Create a random Number

Get a user input,

For loops,

Initialization,

Boolean test,

Iteration expression,

Enhanced For Loops,

Structure of Enhanced for loop
  • Create a String variable called name and set it to null.
  • Assign the first value in name Array to name.
  • Run the body of the loop .The code is bounded by {}
  • Assign the next value in name Array to name.
  • Repeat while there are still elements in the array.

Key points,

  • Adding 1 from a variable. i++; is the same as: i= i+ 1;
  • Using the pre or post decrement to subtract 1 from a variable (i- -;).

References,

--

--

--

Works at Virtusa as Associate Engineer | Software Engineer | Java SE Desktop Development Lecturer | Programming Tutor | Technology Reseacher

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How to Integrate Dialogflow CX and ES Chatbot with Angular JS

2021 week 34, JS array & Base64 encoding. Plus Malaysian national anthem.

A doodle of Tunku Abdul Rahman with the word array in Chinese, Malay, and English on the left.

#10 Common JavaScript errors — How to avoid them?

Vue.js (and Vuex) bug squasher cheatsheet.

How to Build a Simple Web Calculator

Journey to the stars 1 — Event API

Deploy a Nuxtjs Application to Netlify

An intro to useState and useEffect Hooks

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Gawesh Prabhashwara

Gawesh Prabhashwara

Works at Virtusa as Associate Engineer | Software Engineer | Java SE Desktop Development Lecturer | Programming Tutor | Technology Reseacher

More from Medium

I am a lab rat

The Fear Thing

I will love you until the very (front) end — Makers Day 41

Pomodoro Technique