Quiz Java : Pemrograman Berorientasi Objek


The following is preparation before answering quiz questions, PBO course. Jawaban di buat dalam dokumen pdf.

public class multiplication2
{
 public static void main ( String [] args )
 {
 int i = 5 ,x = 0 ;
 while (i < 10 )
 {
  ++ i;
 Systems . out . println ( " \n " );
 while (x < 10 )
 {
  ++ x;
  Systems . out . print ( i + " X " + x + " = " + i ^ x + " \n " );
 } } } }
 
import java.io.BufferedReader ;
import java.io.InputStreamReader ;
import java.io.IOException ;
public class FetchKeyboardData
{
public static void main ( String [] args ){
BufferedReader dataIn = new BufferedReader ( new
InputStreamReader ( System . in ) );
String name = "" ;
Systems . out . print ( "Please Enter Your Name:" );
try {
name = dataIn . readLine ();
} catch ( IOException e ){
Systems . out . println ( "Error!" );
}
Systems . out . println ( "Hello " + name + "!" );
}}

import javax.swing.JOptionPane ;
public class FetchData {
public static void main ( String [] args ){
String varName = "" ;
varName = OptionPane . showInputDialog ( "Please enter your
name" );
String msg = "Hello " + varName + "!" ;
JOptionPane . showMessageDialog ( null , msg);
Systems . out . println (msg);
}
}

A. Values ​​Take three test scores from the user and calculate the average value of these scores.

Give the average output of three tests. Also give a smiley face to the output if the average value is greater than or equal to 60, other than that give output :-(.

1. Use BufferedReader to get input from the user, and System.out to output the results.
2 .Use JOptionPane to get input input from the user and output the results.

B. Reading Numbers Take a number as input from the user, and the output is a word that corresponds to the number. The number entered is between 1-10. If the user enters an incorrect value, the output is "Invalid number".
1. Use an if-else statement 
2. Use a switch statement
 
C. Print One Hundred Times
Create a program that prints your name one hundred times. Create three versions of this program using while loop, do while and for-loop.

D. Power
Calculate the power of a value based on the number and the power value. Create three versions of this program using while loop, do-while and for-loop.


1 Response to "Quiz Java : Pemrograman Berorientasi Objek"

AI Akademik Akreditasi Akuntansi Algoritma Analisis Aplikasi Aplikasi Komputer Arsip Artificial Intelligence Association for Computing Machinery Bahasa Ingris Big Data Bisnis Buku Buku Ajar CAPAIAN PEMBELAJARAN Computer Engineering Computer Science COPRAS CREDIT TRANSFER Curricula Curriculum Data Scientist Desain Grafis Diploma Dua Dosen Komputer Edas Ekonomi Ekonomi Digital Ekonomi Makro Fotografi Informasi Informatika Information Technology Instrumen Intelejensi Bisnis Internet of Things IoT ITS Jaringan Java Kecerdasan Buatan Kepemimpinan Keuangan Kewirausahaan Komputer Komunikasi Komunikasi Bisnis Konseptual Kontrol Kreatif Kualifikasi Kurikulum LAM INFOKOM Magister Terapan Mahasiswa Mahasiswa Komptuer Mahasiswa Komputer Makro Manajemen Manajemen Keuangan Manajemen Sistem Informasi Manajemen Strategis Manajemen Sumber Daya Manusia Manajer Media Sosial Model Multimedia Naskah Pascal Pedoman Pemasaran Pemesaran Digital Bisnis Pemrograman Pemrograman Berorientasi Objek Pemrograman Java Pemrograman Pascal Pemrograman Terstruktur Pendidikan Pengantar Ekonomi Makro Pengembangan Pengetahuan Perilaku Konsumen Masyarakat Produksi Grafika Program Diploma Satu Program Diploma Tiga Program Doktor Program Studi Program Studi Pada Program Magister Program Studi Sarjana Programming Proyek Python REKOGNISI PEMBELAJARAN LAMPAU Sarjana Terapan Sensor Sinyal sistem Sistem Informasi Sistem Pendukung Keputusan Skripsi Software Engineering Sosial STMIK Logika Studi S3 Teknopreneur Teori Organisasi Terstruktur Tesis TIK Tim Tinggi Tugas Akhir Undergraduate Degree WASPAS Web Workshop Youtube