Profile

Cover photo
Monde Masiza
Attended PC Training & Business Collage
Lives in Randburg
10 followers|85,312 views
AboutPostsPhotosYouTube

Stream

Monde Masiza

Shared publicly  - 
1
Sibusiso Skota's profile photo
 
who are the actors bawo.
Add a comment...

Monde Masiza

Shared publicly  - 
 
Programmers live longer
1
Add a comment...

Monde Masiza changed his profile photo.

Shared publicly  - 
1
Add a comment...

Monde Masiza

Shared publicly  - 
 
 
Vb.net is liking government organisation, institutions and private company using  SQL post your Question for help mondemasiza@gmail.com
1
Add a comment...

Monde Masiza

Shared publicly  - 
 
Java is operating on the Panele
1
Add a comment...

Monde Masiza

Shared publicly  - 
 
Java and VB.net should you require a free help to run a program don’t be scared to e-mail me at mondemasiza@gmail.com
 
1
Panya Steven's profile photo
 
Awe so wen r gng 2 d our game
Add a comment...

Monde Masiza

Shared publicly  - 
 
Java allows programmers to spread their wings by showing their talents in drawing. Rectangle and ovals can also be drawn.


// Shave.java
// Display the drawing in java
import java.awt.Graphics;
import javax.swing.JPanel;
 public class Shave extends JPanel
 {
 private int Choice;
 public Shave( int userChoice)
 {
 Choice = userChoice;
}
 public void paintComponent( Graphics g)
 {
 super.paintComponent(g);
 for( int i = 1; i <= 10; i++)
 {
 switch( Choice)
 {
 case 1:
 g.drawRect( 10 + i * 10, 10 + i * 10, 50 + i * 10, 50 + i * 10);
 case 2:
 g.drawOval( 10 + i * 10, 10 + i * 10, 50 + i * 10, 50 + i * 10);
}

}

}

// ShaveTest.java
// Display the actual Drawings on the command window
import javax.swing.JOptionPane;
import javax.swing.JFrame;
 public class ShaveTest
 {
 public static void main( String[] args)
 {
 String input = JOptionPane.showInputDialog("Enter 1 to draw the rectangle" + "Enter 2 to draw overl");
 int Choice = Integer.parseInt(input);
  Shave panel = new Shave( Choice);
  JFrame application = new JFrame();

 application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
 application.add(panel);
 application.setSize(300,300);
 application.setVisible(true);
 

}
}
1
Add a comment...

Monde Masiza

Shared publicly  - 
 
Someone deposited the amount of 1000 in the savings account yielding 5% interest. Assuming that all the interest is left on deposit, calculate using Java and print the amount of many in the account at the end of each year for 10 years.
1
Monde Masiza's profile photo
 
// Interst5.java
// Display the amount of many after ten years of deposit 1000 and interst is 5%
    public class Interest5
 
    {
    public static void main( String[] args)
    {

    double amount = 0;
    double pricipal = 1000.0;
    double rate = 0.05;
    
    System.out.printf("%s%20s\n", "Year","Amount on Disposite");
    
    for( int year = 1; year <= 10; year++)
    {
    amount = pricipal * Math.pow(1.0 + rate, year);
    
    System.out.printf("%4d%,20.2f\n", year, amount);

}// end of for
} // end of main method

}// end of Class interest5
Add a comment...

Monde Masiza

Shared publicly  - 
1
Monde Masiza's profile photo
 
Public Class frmCurvingGrades

    Private Sub btnAnalyze_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAnalyze.Click
        Dim scores() As Integer = {59, 60, 65, 75, 56, 90, 66, 62, 98, 72, 95, 71, 63, 77, 65, 77, 65, 50, 85, 62}
        Dim mean, StandardDeviation As Double
        Dim i As Integer
        Dim temp As Double

        'calculate the mean
        Dim sum As Integer = 0
        For i = 0 To scores.Length - 1
            sum += scores(i)
        Next
        mean = sum / scores.Length

        'calculate standard deviation
        For i = 0 To scores.Length - 1
            temp += (scores(i) - mean) ^ 2
        Next
        StandardDeviation = Math.Sqrt(temp / scores.Length - 1)

        'assign grades
        Dim grades(scores.Length - 1) As String
        For i = 0 To 19
            Select Case scores(i)
                Case Is > mean + 1.5 * StandardDeviation
                    grades(i) = "A"
                Case Is > mean + 0.5 * StandardDeviation
                    grades(i) = "B"
                Case Is > mean - 0.5 * StandardDeviation
                    grades(i) = "C"
                Case Is > mean - 1.5 * StandardDeviation
                    grades(i) = "D"
                Case Else
                    grades(i) = "F"
            End Select
        Next
        'display the output in list box
        lstOutput.Items.Add("There were " + CStr(scores.Length) + " exams.")
        lstOutput.Items.Add("Mean: " + CStr(mean))
        lstOutput.Items.Add("Std. Deviation: " + CStr(StandardDeviation))
        lstOutput.Items.Add("Scores" + vbTab + "Grade")

        For i = 0 To 19
            lstOutput.Items.Add(CStr(scores(i)) + vbTab + grades(i))
        Next
    End Sub
End Class
Add a comment...
Work
Occupation
Web
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Currently
Randburg
Education
  • PC Training & Business Collage
Basic Information
Gender
Male