Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,151,548 members, 7,812,750 topics. Date: Monday, 29 April 2024 at 06:38 PM

Nnasino's Posts

Nairaland Forum / Nnasino's Profile / Nnasino's Posts

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (of 15 pages)

Video Games And Gadgets For Sale / Re: 250GB Play Station 3 With 8 Games With White Pad. by nnasino(m): 10:10am On Dec 22, 2014
Does it come with a hdmi cable?
The games you listed are they real games or are they stored on the console?
Awaiting your reply
Culture / Re: Pictorial History Of Northern Nigeria by nnasino(m): 3:40pm On Dec 19, 2014
nice thread
Programming / Re: My New Year Resolution: 1 Million Naira A Month From Android App Dev In 2015 by nnasino(m): 1:47pm On Dec 19, 2014
Wow, nice one. All the best!
Video Games And Gadgets For Sale / Mortal Kombat 9 Ps3 Needed by nnasino(m): 12:45pm On Dec 19, 2014
Hi, please i need ps3 mortal kombat 9 normal or komplete edition
Gaming / Re: Grand Theft Auto Sans Andreas Is Tougher Than Gta Vice City by nnasino(m): 7:25am On Dec 19, 2014
Thanks boss, but i have a ps3 and i'm no longer a fan of microsoft consoles. But you can pm me the price and specs and i'll see if i have anyone who is interested.

1 Like

Programming / Re: Java Tutorial For Beginners by nnasino(m): 7:20am On Dec 19, 2014
haibe:
i dont get, I thought double' was for numbers with decimals? Shouldn't 'int' be used Instead?
The principle might have a decimal that's why we used double. Generally, when dealing with money we usually use doubles. Also, when we divide by 100 the result could be a fraction so we need to be able to represent fractional numbers.

1 Like

Education / Re: Is There Anything Like Strong 2.1 Or Weak 2.1?? by nnasino(m): 7:18am On Dec 19, 2014
there is no such thing as a weak two one or a strong two one. All that is important is that you are a second class upper graduate. My brother graduated with 3.5 on the dot and he's doing very well in a bank. He has already been promoted twice so most importantly just get the two one and forget about the GPA.
Video Games And Gadgets For Sale / Re: . by nnasino(m): 12:29pm On Dec 18, 2014
is the console still up for sale? i'm interested
Gaming / Re: Grand Theft Auto Sans Andreas Is Tougher Than Gta Vice City by nnasino(m): 10:29am On Dec 18, 2014
Yeah, ofcourse the scope of san andreas is almost 3 times that of vice city. I finished it but it's been a while. If you're playing on pc i suggest that you purchase a good game pad maybe an xbox 360 pad. I think it will make things much easier for you especially when you have to fly planes and all that stuff. Honestly, You're just starting, your still in los santos? I finished San andreas and vice city years on the xbox. Use your right analog stick for the cesar mission. I think it's the mission where you compete with other hydraulic drivers by matching the right analog with the directions that come up on the screen. Good luck

1 Like

Programming / Re: Java Tutorial For Beginners by nnasino(m): 12:49pm On Dec 17, 2014
Hello everyone,
Back to business.
Today, i'll digress a little. I'll be teaching some tips and tricks on how to make the best out of your netbeans ide. I'll introduce code templates.

Code templates are simply snippets of code which we use frequently and therefore we make them shorter to save us typing. There are many builtin templates in netbeans and we can add ours to them. To use code templates simply type the short form of the template and press the tab key. Some of the inbuilt code templates include:
sout --
System.out.println(""wink;
//The cursor will be placed within the quotes
psvm --
public static void main(String[] args){} 

St --
String

fa --
false

if --
 if{}

ife --
 if{}else{}

etc
Now try the above for yourself. Type them then press the tab key.
There are many more built-in code templates available to you in netbeans and not just for java but for most of the languages supported by netbeans. You can check them in the Options>Editor>Code Templates.

You can also create your own code templates depending on what you use frequently. We will create a code template for catching exceptions. There should be a builtin template for try catch but we will just create this to show how it is done.
Open Options>Editor>Code Templates. Click New, type the short form for your new template, we will name ours error. The template is then created. Within the expanded text area, type the following:

try{
${cursor}
}catch(Exception exc){

}

The ${cursor} is where the user's cursor will be placed when the template is inserted.

Provided that you setup your shortcuts as we did in the first lesson then the following shortcuts will work for you. If you didn't set them up, then go to options, keymap and change netbeans to eclipse.

Ctrl-shift-O == This is to organize your imports. That is, if you use classes in your code which you need to import, pressing this shortcut helps you automatically import them. Try this, type
Scanner
and press Ctrl-shift-O. this will add
import java.util.Scanner;
to the top of your file.

Ctrl-shift-F == format code. This is used to format your code. This handles your indentation and generally makes your code look better.

That's all for now. I'll be back soon. Cheers
Programming / Re: Java Tutorial For Beginners by nnasino(m): 12:49pm On Dec 17, 2014
uyigideon:
This was the instruction given to me:

Generating a private key

Download and install Java.

Set Java_Home directory (http://docs.oracle.com/cd/E19182-01/820-7851/inst_cli_jdk_javahome_t/index.html).

Open the command prompt (cmd.exe) as an Administrator, then Run the following command: $ keytool -genkey -v -keystore [keystore_name].keystore -alias [alias_name] -keyalg RSA -keysize 2048 -validity 10000

Keytool will ask for keystore password. Enter password and confirm:
Alright, send me a pm and detail where exactly you experience the issue. But i can assure you that you can start development without all these keysigning ish. You can work locally on your system you don't have to use phonegap build.
Pets / Re: Meet Crash : My Six Months Old Lovely Pet by nnasino(m): 12:51pm On Dec 16, 2014
tonididdy:
Haha this rat is learned.


Sexier than some NL chickx.

Twerk IT crash...go crash, how low can u go...
hahahahahahahaha grin lmao
Pets / Re: Meet Crash : My Six Months Old Lovely Pet by nnasino(m): 12:43pm On Dec 16, 2014
grin Best thread ever. grin
Pets / Re: Meet Crash : My Six Months Old Lovely Pet by nnasino(m): 9:54am On Dec 16, 2014
wow, beautiful rodent and funny comments.

1 Like

Pets / Re: Meet Crash : My Six Months Old Lovely Pet by nnasino(m): 9:52am On Dec 16, 2014
Chrisbenogor:
Nna see nkapi don rebrand himself.
lwkmd
Programming / Re: Java Tutorial For Beginners by nnasino(m): 8:51am On Dec 16, 2014
sampark201:
Sir , Do you give Private Tutorials..
sorry, I don't.
Programming / Re: Java Tutorial For Beginners by nnasino(m): 8:49am On Dec 16, 2014
uyigideon:
Please sir, I want to build mobile application on phonegap, i was ask to get Ios and Adriod Key to be able to build, because i am completely novice, but i was given a free mobile App to Edith and build on Phone gape, i have downloaded Java on my desktop, but i don't no how to set the home page to get my license key i was ask to get. Please help me out with this.
I don't understand your question. but I don't think you need Java to build phone gap applications.
Programming / Re: Java Tutorial For Beginners by nnasino(m): 7:19am On Dec 15, 2014
gememerald:


Does it come with netbeans or eclipse or I have to download the library seperately? @OP
you download d library separately
Programming / Re: Java Tutorial For Beginners by nnasino(m): 5:31pm On Dec 14, 2014
gememerald:
@OP how do you integrate opengl with java for 3d programming?

you canuse the JOGL wrapper/binder
Programming / Re: Java Tutorial For Beginners by nnasino(m): 2:30pm On Dec 14, 2014
romkey:
this can be regarded as the best thread ever.
wow, thanks man, appreciate that.
Programming / Re: Java Tutorial For Beginners by nnasino(m): 12:46pm On Dec 14, 2014
DonaldGenes:
Op, drop your BBM pin

Fortunately, I am learning Java but have gone far.
I have Created some Program using NetBeans
...
Programming / Re: Java Tutorial For Beginners by nnasino(m): 8:54am On Dec 11, 2014
WINDSOW:
@OP,being a programmer working in a firm,Do u jst write open codes like tis or u relate the codes with GUI.
Eg:VB.net for instance,u relate the program codes with textbox,label,button,RadioButton etc

(2). What kind of task do programmers execute saying working in an IT firm.
Eg; like programs to ...

Pls help my curiosity
. 1. Most of the time programs are related to a gui, either a native gui or web ui. In this tutorial, we will get to the gui part and make this a full application but you can't understand guis without understanding classes, objects, loops and the rest. 2. It depends on what your company does. Like for example we use the play framework(java and scala) to build enterprise web and mobile applications for financial institutions. We decided to make it a SaaS (software as a service) application. In conclusion, do not underestimate the relevance of command. Line applications. For anything, it is useful for logging and unit testing.
Programming / Re: Java Tutorial For Beginners by nnasino(m): 1:10pm On Dec 10, 2014
asalimpo:
Y not change d grade letters to a particular case to reduce checking for different cases in the switch statemnt.

Like this right,
Character.toUpperCase(gradeLetter);

Yes, you're right but I haven't taught how to use the java standard library and i am still explaining classes and objects so i don't think we have learnt enough to use that at this point.
Programming / Re: Java Tutorial For Beginners by nnasino(m): 2:39pm On Dec 09, 2014
Hi everyone, a good day to you all. Sorry i've been quite busy.
We will continue the tutorial today with more on objects and classes. We will improve on our program by using the concepts we have learned so properly. We learnt about classes and objects last time but today we will use them in our current program. I will also introduce the concept of an array today.

Looking at our program closely we will need about three classes to properly organize the program:
A Student class, a Semester and a Course class. The student class will contain information such as the name of the student the number of years the student wants to calculate, the CGPA of the student and the semesters of the student. The semester class will contain courses (yes, objects can contain other objects), the TNU (total number of units offered), TGP (total grade point) and the GPA of the semester. With these three classes we can restructure our program better.

But first, let us introduce the concept of the array. An array is simply a collection of variables. Yes, that simple it is simply a collection of variables. For example, in our program, each semester has a collection of courses. So we say each semester has an array of courses.
Note: there are many other ways of organizing collections of data but we use the array as it is simple and basic.

Array syntax:
to declare an array we write:

type[] arrayname;


Now, to initialize an array is a bit different. We use the new keyword and square brackets as follows:

arrayname = new int[size];


For example, to create an array of Courses that will contain 10 courses:

Course[] courseList = new Course[10];


After creating the array, we can access its elements by using the [] brackets. EAch element has an index. An array that is of size 10 has indices from 0 to 9. Counting in computers starts from zero so it will end at nine (Notice: nairaland pages start from zero wink). So to access the first element we use
courseList[0]
. To access the 10th character we use
courseList[9]
. If you try to access an element that doesn't exist for instance
courseList[10]
an exception will be thrown. Finally, to know the size of an array we can get that from the array as follows:
 arrayname.length;
courseList.length;


With this info, we can write out the design of our program:


Student
--nameOfStudent
--CGPA
--TTNU
--TTGP
--noOfYears
--Semesters[] -- array of semesters
Semester
--noOfCourses;
--TNU
--TGP
--GPA
--Courses[] --array of courses
Course
--courseCode
--creditLoad
--gradeLetter
--score


In this our project, we will be creating this app like a real life app using packages.
Open up your netbeans ide. Click new project and select java application:

Make sure create main class is ticked.

Name your project GPA app and finish. Create three classes Course.java, Semester.java and Student.java. While creating these classes set their package to
core
. Now, in each file, create the variables for each class. Remember to keep all of them private. Now, netbeans can help us with the getter and setter methods as well as constructors. Press the shortcut key alt-shift-s (or right click within the editor and click insert code), select getter and setter, then select all your variables and click generate. Do this for all the files. Press the shortcut key alt-shift-s and click constructor, then select the following for the classes as follows:

Course:
courseCode
creditLoad

Student:
nameOfStudent
noOfYears

Semester:
noOfCourses



After clicking the generate button, we will edit the constructors and some of the setters to our own taste.
We edit the Student constructor as follows:

public Student(String nameOfStudent, int noOfYears) {
this.nameOfStudent = nameOfStudent;
this.noOfYears = noOfYears;
//initialize the semester list
semesters = new Semester[noOfYears];

}


We edit the Semester constructor as follows:

public Semester(int noOfCourses) {
this.noOfCourses = noOfCourses;
courses = new Course[noOfCourses];
}


Now, create getters and setters for all the variables in the Course class.


For the getters and setters:
We edit the setter setGradeLetter(char gradeLetter) as follows:

public void setGradeLetter(char gradeLetter) throws Exception {
switch (gradeLetter) {
case 'a':
case 'A':
this.gradeLetter = 'A';
this.score = 5 * creditLoad;
case 'b':
case 'B':
this.gradeLetter = 'B';
this.score = 4 * creditLoad;
case 'c':
case 'C':
this.gradeLetter = 'C';
this.score = 3 * creditLoad;
case 'd':
case 'D':
this.gradeLetter = 'D';
this.score = 2 * creditLoad;
case 'e':
case 'E':
this.gradeLetter = 'E';
this.score = 1 * creditLoad;
case 'f':
case 'F':
this.gradeLetter = 'F';
this.score = 0;
default:
throw new Exception("Please enter a grade letter from A to F"wink;
}
}


We edit the setter for credit load as follows:

public void setCreditLoad(int creditLoad) throws Exception{
if (creditLoad <= 20 && creditLoad >= 0) {
this.creditLoad = creditLoad;
}
throw new Exception("Please enter credit load greater than 0 and less than 20"wink;
}
Phones / Re: What Phone Are You Currently Using? Pro's & Con's by nnasino(m): 1:05pm On Dec 09, 2014
Bold 5 and tecno m7.
Bold 5: pros
Cheap internet service
cons:
sometimes it hangs and switches off
Romance / Re: Our Pastor Sided Him For "Punishing Me After Marriage" by nnasino(m): 9:17am On Dec 09, 2014
Tales by moonlight undecided
Technology Market / Re: Watchout For Jumia n Konga Black Friday Scams by nnasino(m): 1:33pm On Dec 08, 2014
Mattex001:
lucky enough?? does dat mean dat some people wont be able to get theirs ?
Many people haven't gotten theirs. My colleague who ordered a few minutes after i ordered mine still hasn't gotten his. So i just feel i was lucky to have gotten mine on monday.
Technology Market / Re: Watchout For Jumia n Konga Black Friday Scams by nnasino(m): 11:12am On Dec 08, 2014
Truman155:
the deal for the spark tablet is too good to be true.can anyone who has received his order of the tab give a rating of the tab pls
The tab is very good i got mine last monday, check the previous page. The tab is excellent considering the price it was bought for. Good front camera, good battery and everything. I thank God for making me lucky enough to get mine.
Programming / Re: Java Tutorial For Beginners by nnasino(m): 9:38am On Dec 04, 2014
talk2chichi:
Hello Lecturer, please am new in programming, I use java but I don't know if you also know how to use oracle 10g, I will really need your help in both. Thanks
Well, i use oracle 11g but it's just basic stuff, no pl/sql.
Technology Market / Re: Watchout For Jumia n Konga Black Friday Scams by nnasino(m): 10:26am On Dec 02, 2014
ugonna1054:
pls wat day did u order for ur tab, b.cos I ordered too on friday evening and am yet to receive a call from dem for pick up...
On friday
Technology Market / Re: Watchout For Jumia n Konga Black Friday Scams by nnasino(m): 4:49pm On Dec 01, 2014
nnasino:
I ordered something today on konga, i'll give an update later on. But my brother said its legit. Konga warehouse is opposite his office and some of his colleagues bought stuff yesterday. He encouraged me to go on. I'll post the outcome later on.
Well, well done konga!!. My tablet arrived today in perfect condition and i can attest that konga's yakata promotion was real. Before the promo it was 21k and on the promo it was 10k. Its now 26k and out of stock. So glad I ordered imagine this tab for 10k.
http:///spark-sp-c002-quad-core-3g-wifi-16gb-hdd-8-inch-tablet-blue-1071409

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (of 15 pages)

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 60
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.