100% de satisfacción garantizada Inmediatamente disponible después del pago Tanto en línea como en PDF No estas atado a nada 4,6 TrustPilot
logo-home
Examen

Instructors Solutions Manual Introduction to Java Programming and Data Structures Comprehensive Version ABET Course ,Assessment ACM-IEEE Curricular 2013, UML Diagram Solution

Puntuación
-
Vendido
-
Páginas
60
Grado
A+
Subido en
08-08-2024
Escrito en
2024/2025

Instructors Solutions Manual Introduction to Java Programming and Data Structures Comprehensive Version ABET Course ,Assessment ACM-IEEE Curricular 2013, UML Diagram Solution

Institución
SolutionManual
Grado
SolutionManual

Vista previa del contenido

Sample Final Exam for CSCI 1301 (Java) Covers chapters 1-8


FINAL EXAM AND COURSE OUTCOMES MATCHING
COURSE OUTCOMES
Upon successful completion of this course, students should be able to
1. analyze and design strategies for solving basic programming problems.
2. use primitive data types, selection statements, loops, methods to write programs.
3. develop programs to solve a variety of problems in math, science, business, and
games.
4. use the step-wise refinement approach.
5. use arrays to store, process, and sort data.
6. use an IDE to develop programs.


Here is a mapping of the final comprehensive exam against the course outcomes:

Question Matches outcomes
Part I(a) 2
Part I(b) 2
Part I(c) 2
Part II(a) 2
Part II(b) 2
Part II(c) 2
Part II(d) 2
Part II(e) 2, 5
Part III(a) 1, 2, 3
Part III(b) 1, 2, 3, 4
Part III(c) 1, 2, 3, 4, 5
Part VI 1, 2, 3, 4, 5




1

, Name:__________________ CSCI 1301 Final
Armstrong Atlantic State University
Covers chs 1-8 Instructor: Dr. Y. Daniel Liang

Please note that the university policy prohibits giving the exam score by email. If you need to know your
final exam score, come to see me during my office hours next semester.

I pledge by honor that I will not discuss the contents of this exam with
anyone.

Signed by ___________________ Date ___________________


Part I. (2 pts each)
a. How many times is the following loop body repeated? What is the
output of the loop?
int i = 0;
while (i < 10) {
if ((i + 1) % 2 == 0)
System.out.println(i);

i++;
}

b. Convert the following for loop into a do-while loop.

int sum = 0;
for (int i = 0; i < 100; i++) {
sum += i;
}

c. Convert the following if statement using a switch statement

// Find interest rate based on year
if (numOfYears == 7)
annualInterestRate = 7.25;
else if (numOfYears == 15)
annualInterestRate = 8.50;
else if (numOfYears == 30)
annualInterestRate = 9.0;
else {
System.out.println("Wrong number of years");
System.exit(0);
}



Part II: Show the output of the following code:

a: (2 pts)

public class Test1 {
public static void main(String[] args) {
int i = 1;
while (i < 10) {
System.out.print(i + " ");
i = i + 3;



2

, }
}
}

b. (3 pts)
Suppose the input is 2 3 4 5 0. What is the output of the
following code?

import java.util.Scanner;


public class Test {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);

int number, max;
number = input.nextInt();
max = number;

while (number != 0) {
number = input.nextInt();
if (number > max)
max = number;
}

System.out.println("max is " + max);
System.out.println("number " + number);
}
}

c. (3 pts)
public class Test {
public static void main(String[] args) {
System.out.println(xMethod(5672));
}

public static int xMethod(int number) {
int result = 0;
while (number != 0) {
int remainder = number % 10;
result = result * 10 + remainder;
number = number / 10;
}

return result;
}
}


d. (3 pt)
public class Test {
public static void main(String[] args) {
int number = 0;
int[] numbers = new int[1];




3

, m(number, numbers);

System.out.println("number is " + number
+ " and numbers[0] is " + numbers[0]);
}

public static void m(int x, int[] y) {
x = 3;
y[0] = 3;
}
}



e. (3 pt) Suppose the input is 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3
4. What is the output of the following code?
import java.util.Scanner;

public class Test {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);

double[][] m = new double[4][4];

for (int i = 0; i < 4; i++)
for (int j = 0; j < 4; j++)
m[i][j] = input.nextDouble();

System.out.print(ttt(m));
}

public static int ttt(double[][] m) {
int sum = 0;

for (int i = 0; i < m.length; i++)
sum += m[i][i];

return sum;
}
}




4

Escuela, estudio y materia

Institución
SolutionManual
Grado
SolutionManual

Información del documento

Subido en
8 de agosto de 2024
Número de páginas
60
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas

Temas

$18.98
Accede al documento completo:

100% de satisfacción garantizada
Inmediatamente disponible después del pago
Tanto en línea como en PDF
No estas atado a nada

Conoce al vendedor

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
StuviaGuides West Virgina University
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
15856
Miembro desde
6 año
Número de seguidores
8357
Documentos
5619
Última venta
9 horas hace
Accounting, Finance, Statistics, Computer Science, Nursing, Chemistry, Biology &amp; More — A+ Test Banks, Study Guides &amp; Solutions

As a Top 1st Seller on Stuvia and a nursing professional, my mission is to be your light in the dark during nursing school and beyond. I know how stressful exams and assignments can be, which is why I’ve created clear, reliable, and well-structured resources to help you succeed. I offer test banks, study guides, and solution manuals for all subjects — including specialized test banks and solution manuals for business books. My materials have already supported countless students in achieving higher grades, and I want them to be the guide that makes your academic journey easier too. I’m passionate, approachable, and always focused on quality — because I believe every student deserves the chance to excel.

Lee mas Leer menos
4.3

2248 reseñas

5
1540
4
298
3
178
2
72
1
160

Documentos populares

Recientemente visto por ti

Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes