• Tidak ada hasil yang ditemukan

Multimedia Technology CPIT 380 Quiz

N/A
N/A
Protected

Academic year: 2025

Membagikan "Multimedia Technology CPIT 380 Quiz"

Copied!
4
0
0

Teks penuh

(1)

import java.util.Scanner;

public class FinalExamA{

public static void main(String []args){

Scanner s=new Scanner(System.in);

System.out.println("Choose one of the following\n1.Picture Manipulating"

+"\n2.Sound Manipulation\n3.Manipulating Texts");

int choice=s.nextInt();

//for the first question if(choice==1){

//ask the user to pick a picture file.

System.out.println("Choose one of the following\n1.Dispaly the width and the height"

+"\n2.Explore the picture.\n3.Decrease the red to .25 of the picture length"

+"\n4.Negate the picture\n5.mirror the picture vertically and decrease"

+" the green color of the right side by .5");

int pic_choices=s.nextInt();

if(pic_choices==1){

//dispaly the width and the height of the pic.

} else

if(pic_choices==2){

//Explore the picture

}

(2)

Multimedia Technology CPIT 380 Quiz

else if(pic_choices==3){

//Decrease the red to .25 of the picture length

}

else if(pic_choices==4){

//4.Negate the picture

}

else if(pic_choices==5){

//5.mirror the picture vertically and decrease the green color of the right side by .5

} }

//for the second question else if (choice==2){

//ask the user to pick a sound file.

System.out.println("Choose one of the following\n1.Display the value of the first 50 samples of the sound"

+"\n2.Set the last sample value of the sound to 100\n3.Decrease the volume of the sound by .7 "

+"\n4.Clip the sound from the first index to the half length.\n"+

"5.Increase the volume of the first half of the sound by 5");

int sound_choices=s.nextInt();

if(sound_choices==1){

//Display the value of the first 50 samples of the sound }

else

(3)

Multimedia Technology CPIT 380 Quiz

if(sound_choices==2){

//Set the last sample value of the sound to 100

}

else if(sound_choices==3){

//Decrease the volume of the sound by .7

}

else if(sound_choices==4){

//Clip the sound from the first index to the half length.

}

else if(sound_choices==5){

//Increase the volume of the first half of the sound by 5

} }

//for the third question else if(choice==3){

//Save your ID in a string and do the tasks

//3.1. Substring your ID from 2 to the end of the ID and print it.

//3.2. Check if your ID ends with 0 or 1 , if so print out ("Yes it ends with 0 or 1") //, otherwise ("It doesn’t end with 0 nor 1").

//3.3. Convert the previous message to Upper cases using a proper method and print it again

(4)

Multimedia Technology CPIT 380 Quiz

}}}

Referensi

Dokumen terkait

“Hello World!” in Java COMPSCI 230: OOD 11  HelloWorld.javaJava source code: public class HelloWorld { public static void mainString[] args { System.out.println"Hello World!"; } }

“Hello World!” in Java  HelloWorld.java Java source code: public class HelloWorld { public static void mainString[] args { System.out.println"Hello World!"; } }  This is the

Solution In one of your classes, ensure you implement astaticmethod named Mainwith one of the following signatures: public static void Main; public static void Mainstring[] args;

// // class TestPC.java // import person.*; class TestPC { public static void mainString args[] { // Initialize the eyedb package and parse the default eyedb options // on the

import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class SDA13141LV2 { public static void main String[] args throws IOException {

Example import javax.swing.*; import java.awt.*; public class OnePrgLine extends JPanel{ public static void mainString[] args { int x1,y1,xn,yn; JFrame frame = new

import java.util.Scanner; public class AccountTest { // main method begins execution of Java application public static void main String args[] { Account account1 = new Account

TOUIR Page 3 // import Section – import used java libraries public class MyProgramName { // main method public static void main String args[] { // Declaration section – Declare