You will need java and eclipse for this assignment. This is a timed assignment for 1:30 minutes.
Listen
CSCI 1301 – COMPUTER SCIENCE
CSCI 1301 Computer Science I
Ed Redmond
University of North Georgia
82 College Circle
Dahlonega, GA 30597
Phone Number: (470) 387-1398
E-mail address:
Office hours:
Tuesdays 7PM – 8PM EST
Sundays 3PM – 4PM EST
During office hours, you can find me in
Collaborate Ultra (Click on
Communication > Collaborate Ultra).
You can also reach me during office
hours at the above phone number.
NOTICE: Please use the internal course
e-mail for general correspondence. I
provide my external e-mail address for
emergencies only. I cannot answer
questions, accept assignments, or
discuss grades via external e-mail so
please use it for emergencies only.
Response Time: Unless you are notified
otherwise, I will work to respond to all
student questions and emails within 24
hours during the week and within 48
hours during the weekend.
Attendance Verification & Semester Dates
IMPORTANT – In order to confirm your attendance and participation in this course, you must
complete the Mandatory Attendance Quiz AND the Introductions discussion activity. BOTH of
these activities are required and can be found within the START HERE module.
Please note: failure to complete these activities may result in you being removed from the
course.
Course Description
CSCI 1301 is an introduction to computer science with coverage of algorithmic foundations,
hardware concepts, and introductory programming in Java. Specific topics include data storage,
data manipulation, and data abstractions. Programming concepts covered are algorithm design,
primitive data types, and expressions, loops, modular programming, conditional execution,
program logic, and arrays.
Course Objectives
After completing the eCore CSCI 1301 course, students will be able to
1.
Analyze and design strategies for solving basic programming problems.
2.
3.
Write expressions using constants, variables, and operators.
Write and apply sequential, conditional and loop constructs.
4.
5.
Create and invoke methods with procedural abstraction and stepwise refinement.
Use arrays to store and process data.
6.
Perform input/output operations and handle exceptions.
Prerequisites
See your home institution’s prerequisite requirement.
Course Credit Compliance
This course will be delivered entirely online with the exception of the minimum of one face-toface (FTF) proctored exam and a maximum of two FTF proctored exams. This requires the online
equivalent of 3000 minutes of instruction (instruction time) and an additional 6000 minutes of
supporting activities. As such, you will be required to complete the following online activities
during this course (times are approximate):
Instruction Time
Participation & Discussion
Postings
200
minutes
Virtual meetings/chat or audio &
video
150
minutes
Course Content Facilitation
600
minutes
Course Assignments
550
minutes
Coding Labs
750
minutes
Online quizzes
600
minutes
Proctored Exams
150
minutes
It is anticipated that students will need to work independently for twice the number of minutes
listed above to complete the online activities.
Course Texts
eCore has explored cost-reducing options for students and currently offers open-source texts
for this course. The term open implies information or technology that is shared freely without
copyright restrictions. NOTE: These materials are collected from multiple higher education
resources, including sources that are printed in British-English. The spelling of words and
grammar may differ to American-English. Although extremely rare, some material may have
minor typos. We strongly encourage you to report these mistakes using the Student Change
Request form in the Course Resources module.
The open texts for this course allow students to read, download, and/or print the book at no
cost. The assigned chapters are embedded in each of the seven units that make up the course.
Title
Think Java: How to Think Like a Computer
Scientist
Authors
Allen B. Downey, Chris Mayfield
Publisher
Green Tea Press
Edition/Year
Version 6.1.3, 2016
Required/Optional REQUIRED
Access
The assigned parts and chapters are embedded in
the course content, but you can also access the
full version at
http://greenteapress.com/thinkjava6/thinkjava.pdf
Title
Java, Java, Java, 3e
Authors
R. Morelli and R. Walde
Publisher
Pearson Education, Inc.
Edition/Year
2003
Required/Optional REQUIRED
Access
The assigned parts and chapters are embedded
in the course content, but you can also access the
full version at
http://www.cs.trincoll.edu/~ram/jjj/jjj-os20170625.pdf
Required Software
The following third-party software applications must be downloaded in order to complete this
course:
●
Java Platform (JDK) Standard Edition 14 (from www.oracle.com)
●
Eclipse IDE Installer (from https://www.eclipse.org/downloads/)
Unit Breakdown
The following units are covered in this course:
●
●
Unit 1 Computer Programming
Unit 2 Variables and Operators
●
●
●
●
Unit 3 Methods, Strings and Console Input/output
Unit 4 Methods and Modular Design
Unit 5 Conditional and Logic
Unit 6 Loops
●
Unit 7 Arrays and Reference
Attendance, Participation, and Time Commitment
“Attendance” and participation are required. You will be expected to participate in ongoing
discussions of the lesson topics and to interact with other students and your instructor regularly.
It is expected that you will demonstrate a positive attitude and courtesy toward other
participants in the discussion and observe good discussion netiquette. Be sure to read and
observe the following procedures:
●
●
You are a guest in the instructor’s classroom, so be sure to observe the class rules.
Practice manners and civility, and be polite and respectful of your instructor and
●
●
●
classmates in all your communication.
Respect your instructor, and be on time in your work submissions.
Keep your instructor informed of your status.
Address your instructor as Professor or Doctor.
●
●
Use correct grammar and punctuation in all your communication (‘Dear Professor xxx’
not ‘Hey’).
Accept your instructor’s feedback and learn from it.
In the online environment, problems associated with power outages, networks being down, and
ISP troubles inevitably result in legitimate reasons for delays, however, you should still be
prepared to deliver your work by the stated deadlines. If you have a problem, let your instructor
know as soon as possible. The student who repeatedly turns in late work will be subject to
penalties.
Time Commitment
Taking an online course is not easier or faster. On the contrary, it will take as much time as
taking a face-to-face class or more. If you normally go to class 3 hours per week per course, you
will need to devote that same amount of time to your online course. In addition to online time,
you should spend time studying and working with course materials several hours per week
offline. It will be helpful to set aside regular study time when you can work uninterrupted.
Offline time could be spent in composing messages to post online, reading, studying, and
working homework problems.
The amount of time it will take you to complete the work for the course will depend on many
factors, which will vary with each individual. Students can expect to spend anywhere from 8 – 15
hours per week on this course. Consult the course Calendar and your instructor to be sure you
are on schedule, keeping up with the material and taking quizzes on time.
As a general rule, in this course you will be expected to:
●
●
●
●
Log in regularly to check messages from your instructor and other students.
Check the Calendar for announcements from your instructor.
Read and study online materials and work all assigned problems for each lesson.
Complete all course work and assignments in the time allowed.
Conduct
You are expected to refrain from profanity, crudeness, and slurs of any kind. In other words, you
are expected to behave and treat your fellow students and instructor fairly, just as you would in
the traditional classroom.
Just as you would listen to others speak in the classroom, you are expected to read and respond
politely and thoughtfully to others in the online course. You are expected to refrain from crude
or unbecoming comments and be supportive of the class. Proper conduct applies to all forms of
communication in the course.
Late Policy
Late Assignments: Late assignments will be penalized 10% and 10% more for each day after the
due date. Due to the short schedule and COVID 19, contact me if you anticipate for any of your
assignments to be late.
Late Quizzes: Quizzes that run past the time limit will be penalized 10%.
Late Discussions: Late discussions will be penalized 10%.
Late Labs: Late labs will be penalized 10% and 10% more for each day after the due date. Due to
the short schedule and COVID 19, contact me if you anticipate for any of your labs to be late.
Late Exams: Exams that run past the time limit will be penalized 10%.
Grading and Standards
Grade Breakdown
GRADED ACTIVITY
WEIGHT
Due Date
Assignments
15%
Attendance Verification
1%
Discussions & Participation
4%
Coding Labs
20%
Quizzes
10%
Exams 1 & 2
10%
Midterm Exam
15%
March 31, 2021
Final Exam
15%
May 1, 2021
Final Project
10%
April 27, 2021
Grade Scale
Grades are based on student performance and capability. Simply turning in all the assignments
does not guarantee that the student will receive a “good grade.” To receive a higher grade, a
student must demonstrate proficiency in the material. For different students, gaining that
proficiency requires different levels of work, because not all students walk into the class with the
same aptitude for the course content. The standards for the respective grades are as follows:
A: 90-100%
B: 80-89%
C: 70-79%
D: 60-69%
F: 0-59%
Grade Turnaround: All assignments and assessments will be graded within one week’s time.
The instructor will provide comments along with the grade as necessary for feedback.
Expectations and Standards
A – To achieve this grade you must display superior performance in his/her course work. This
includes demonstrating the ability to process and comprehend complex ideas, and to be able to
convey those ideas to others in a clear, intelligent manner. An “A” student will go beyond simple
requirements and seek to excel in his/her preparation for and presentation of assigned work.
He/she will demonstrate excellence in communication skills and the ability to contextualize
material.
B – To achieve this grade you need to display above-average performance in your course work,
including demonstrating the ability to process and comprehend complex ideas, while being able
to convey those ideas in a clear, intelligent manner. As a “B” student you will also go beyond
minimum requirements in terms of preparation and presentation of assigned work. You will
demonstrate above-average communication skills and ability to contextualize material.
C – For this grade, you must meet the minimum requirements for the course, displaying
adequate performance in his/her course work, and adequately demonstrate the ability to
comprehend complex ideas, while also being able to convey those ideas in a like manner. A “C”
student demonstrates competence in terms of preparation and presentation of assigned work.
You will demonstrate adequate communication skills and the ability to contextualize materials.
D – A student receiving this grade is performing below the minimum requirements for the
course. This could include failure to complete or turn in assignments on a timely basis, or failure
to adequately demonstrate the ability to comprehend or convey complex ideas. A “D” indicates
that your performance is below the average in terms of preparation and presentation of
assigned work. You may not be demonstrating adequate communication skills or the ability to
contextualize materials.
F – If you receive an F, you have failed to meet the requirements of the course, including failure
to complete or turn in assignments, or failure to demonstrate the ability to comprehend or
convey complex ideas. An “F” student has not performed in a manner satisfactory to the
standards of the class.
Academic Honesty
(Acknowledgement is hereby given to Georgia State University on whose policy this is based).
Violation of the Academic Honesty Policy can result in failure of the assignment, failure of the
course, and/or further consequences form the student’s home institution. Ignorance of this
policy is not an excuse or a means to repeal a charge of academic dishonesty.
As members of the academic community, all students are expected to recognize and uphold
standards of intellectual and academic integrity. The University System of Georgia assumes as a
basic and minimum standard of conduct in academic matters that students be honest and that
they submit for credit only the products of their own efforts. Both the ideals of scholarship and
the need for fairness require that all dishonest work be rejected as a basis for academic credit.
They also require that students refrain from any and all forms of dishonorable or unethical
conduct related to their academic work.
In an effort to foster an environment of academic integrity and to prevent academic dishonesty,
students are expected to discuss with faculty the expectations regarding course assignments
and standards of conduct. In addition, students are encouraged to discuss freely with faculty,
academic advisers, and other members of the academic community any questions pertaining to
the provisions of this policy.
For more information, visit: https://ecore.usg.edu/current-students/student-guide/policies-andprocedures#academic-honesty
Frequently Asked Questions and Helpful Links
I need:
LINK
ADA
https://ecore.usg.edu/current-students/student-guide/academic-services#stud
Accommodations
Technical
Support
https://ecore.usg.edu/current-students/student-guide/computer-support
https://ecore.usg.edu/current-students/student-guide/academic-services#proc
Proctored Exam
and/or Exam
Extension
information
The University System of Georgia Board of Regents requires that each eCore c
experience of significance, and a proctored experience is required for successf
courses requiring only one proctored exam, failure to take that exam will resu
regardless of the average of other grades. In courses in which the instructor re
student may or may not pass the course as long as they take at least one exam
other words, the zero received on the missed exam will lower the average grad
perhaps below the passing mark.
To Report a
Course Error
https://docs.google.com/forms/d/e/1FAIpQLSdzKI9SXFh7oDcAjtA8Wj8Mk9z1D
To Make a
Student
Complaint
https://ecore.usg.edu/current-students/student-guide/policies-and-procedures
policy
To Make a Grade
https://ecore.usg.edu/current-students/student-guide/policies-and-procedures
Appeal
To Withdraw
from a Course
https://ecore.usg.edu/current-students/student-guide/academic-services#drop
course
To Understand
the eCampus
Academic
Honesty Policy
https://ecore.usg.edu/current-students/student-guide/policies-and-procedures
To Know the
Campus
https://www.usg.edu/hb280/additional_information
Carry/HB 280
Policy
Lesson 2.2 Quiz
Time Limit: 0:45:00
Time Left:0:44:07
Laurence Dixon: Attempt 2
What will be the value of z as a result of executing the following
code?
Page 1:
1
2
3
4
5
6
public class Output {
public static void main(String[]
args) {
7
8
int x = 5, y = 28;
9
float z;
z = (float) (y / x);
10
}
}
5.60
5.6
3.0
5.0
Question 1 (4 points)
Listen
The
search repeatedly divides the portion of an array being searched in half.
binary
selection
sequential
iterative
Consider the code below. How many times is the value of x printed? (in other words,
how many times is the loop executed?)
public static void main(String args[]) {
int x = 11;
while( x < 12 ) {
System.out.println(x);
X++;
}
}
1
2
11
How many numbers are printed?
public static void main(String[] args) {
int count = 1;
do {
System.out.println(count);
count++;
} while (count < 17);
}
18
17
16
0
None of the above
Question 4 (4 points)
Listen
What statement should be used instead of ??? to ensure loop runs exactly 15 times?
for (int i = 0; iy
Oy>x
Ox+y
Ox>=y
Question 8 (4 points)
Listen
Given the following declaration, what is the value of numbers[5]?
double[] numbers = { 10.0, 12.0, 14.0, 16.0, 18.0};
18.0
16.0
14.0
None of the above
Question 9 (4 points)
Listen
Assume correct is a boolean variable. Which command below will accomplish the
same thing as
if (x == 5)
correct = false;
else
correct = true;
correct = true;
correct = false;
correct = x;
correct = (x != 5);
correct = ! (x ==
5);
Question 10 (4 points)
Listen
Identify one correctly written expression in JAVA.
Boolean flag = false;
O Boolean flag = False;
boolean flag = False;
O boolean flag = false;
Question 11 (4 points)
Listen
Given the following code snippet, and assuming it is embedded in JAVA project
which compiles and runs, what would be printed?
int a = 15;
System.out.println(5 > a);
O true
false
Nothing is printed
Question 12 (4 points)
Listen
What would be the results of the following code?
int[] x = {55, 33, 88, 22, 99, 11, 44, 66, 77 };
int a = 10;
if(x[2] > x[5])
a = 5;
else
a = 8;
O a = 5
O a = 8
O a = 10
There will be a compilation error because you cannot compare array elements
Question 13 (4 points)
Listen
Assume correct is a boolean variable. Which command below will accomplish the
same thing as
if (x == 7) {
correct = true;
else
correct = false;
}
correct = true;
correct = false;
correct = x;
correct = (x = 5);
correct = (x == 7);
Question 14 (4 points)
Listen →
Given the following declaration, what is the index of 16.0?
double[] numbers = { 10.0, 12.0, 14.0, 16.0, 18.0};
2
3
4
05
Question 15 (4 points)
Listen
The first index of an array is always
0-1
O
0
01
02
This program segment needs to convert a score to its equivalent grade using the
following conversion criteria: ‘A’ = 90.. 100; ‘B’ = 80 .. 89; ‘C’ = 70 .. 79; ‘F’ = 0 .. 69.
Consider the following program segment. Assume that this segment is executed five
times with score values of 50, 60, 70, 80, and 90. What will be the five grades?
int score;
char grade;
score = some int value in the range [0.100); // remember that program runs 5 times
if (score >= 90)
grade = ‘A’;
else if (score >= 80)
grade = ‘B’;
else if (score >= 70)
grade = ‘C’;
else
grade = ‘F;
System.out.print(grade);
FCBAA
grade = ‘A’;
else if (score >= 80)
grade = ‘B’;
else if (score >= 70)
grade = ‘C’;
else
grade = ‘F’;
System.out.print(grade);
FCBAA
AABCF
ABCFF
FFFCB
ABCDF
Question 17 (4 points)
Listen
The sequential search algorithm
requires the array to be ordered.
must always be implemented as a method.
I will not execute if the element is not in the array.
uses a loop to sequentially step through an array, starting with the first element.
Question 17 (4 points)
Listen
The sequential search algorithm
requires the array to be ordered.
must always be implemented as a method.
I will not execute if the element is not in the array.
uses a loop to sequentially step through an array, starting with the first element.
Question 18 (4 points)
Listen
Which of the following declarations has an error?
int[] numbers = new int[5];
String[] numbers = new int[5];
String[] numbers! = new int[5];
double[] numbers = new double[5];
Consider the code below. What needs to be placed instead of ??? so that loop is run
exactly 11 times?
public static void main(String args[]) {
int x = 6;
while( x > ???) {
System.out.println( x );
X–;
}
}
6
O-1
-5
Consider the code below. What needs to be placed instead of ??? so that loop is run
exactly 11 times?
public static void main(String args[]) {
int x = 6;
while( x > ???) {
System.out.println( x );
X–;
}
}
6
O-1
-5
Question 20 (4 points)
Listen
What is the value of x after the following code executes?
int[] numbers1 = { 3, 6, 9, 12, 15 };
int[] numbers2 = { 2, 4, 6, 8, 10 };
x = numbers 1[3] + numbers 2[4];
10
15
20
22
Written Response
Question 21 (20 points)
Listen
Write a loop that prints the content of an array of integers named numbers.
Paragraph
Β Ι Ο
A
>>
EQ
public class Output {
public static void main(String[] args) {
int x = 5, y = 20;
X += 32;
y /= 4;
System.out.println(“x = ” + x + “, y = ” +
y);
}
}
Ox = 32, y = 4
x = 9, y = 52
x = 37, y = 5
x = 160, y = 80
Question 3 (1 point)
Listen
What will be displayed after the following statements have been executed?
double x;
x = 54.3;
System.out.println(“x = ” + x);
Ox = 54.3
х
Ox = 108.6
Nothing, this is an error.
What will be the output of the following code?
public class Output {
public static void main(String[] args) {
int hour
=
11, minute
59;
System.out.print(“The current time is “);
System.out.print(hour);
System.out.print(“:”);
System.out.print(minute);
System.out.println(“.”);
}
}
The current time is
11
:
59.
The current time is
11:59.
The current time is 11:59.
11:59
Question 5 (1 point)
Listen
What will be the value of z after the following statements have been executed?
int x = 4, y = 33;
double z;
z = (double) (y / x);
8.25
4
8
8.0
What will be displayed after the following code has been executed?
public class Output {
public static void main(String[] args) {
int x =
15, y = 20, z = 32;
x += 12;
y /= 6;
Z
–
14;
System.out.println(“x = ” + x +
“, y = ” + y +
11
Z =
+z);
ور
}
}
x = 27, y = 3.333, z = 18
x = 27, y = 2, z = 18
Ox= 27, y = 3, z = 18
Ox= 37, y = 14, z = 4
Question 7 (1 point)
Listen →
When Java does integer division, the result is
rounded up
rounded down
O rounded to the nearest tenth
rounded to the nearest one hundredth
Question 7 (1 point)
Listen →
When Java does integer division, the result is
rounded up
rounded down
O rounded to the nearest tenth
rounded to the nearest one hundredth
public class Output {
public static void main(String[] args) {
final int x = 22;
int y = 4;
X += y;
” + x +
System.out.println(“x =
“, y = ” + y);
}
}
x = 22, y = 4
Ox = 22, y = 26
Ox = 22, y = 88
Nothing, this is an error
Question 9 (1 point)
Listen
Mathematical expressions in Java can contain:
Numbers only
Variable names only
Operators only
Operators, Numbers and variable names
Question 10 (1 point)
Listen
In general you cannot perform mathematical operations on strings, even if the strings
look like numbers.
True
False
A low-level programming language is a programming language that is designed to be
easy for a computer to run.
True
False
Question 2 (1 point)
Listen
is the output of the compiler, after translating the program.
Bit code
Native code
Object code
Source code
Question 3 (1 point)
Listen
The type of code generated by the Java compiler is called
Bit code
Byte code
Object code
Source code
Question 4 (1 point)
Listen
Java is both a compiled and interpreted language.
True
False
Question 5 (1 point)
Listen
A small disadvantage of high-level language is that programs written in a high-level
language have to be translated before they can run.
True
False
Question 6 (1 point)
Listen
A set of unambiguous step-by-step instructions that solves a problem defines a(n)
Algorithm
Command
Logarithm
Program
Question 7 (1 point)
Listen
Object code is easy and fast) to interpret, like machine language, but it is also
portable, like a high-level language.
True
False
Question 8 (1 point)
Listen
This type of program translates a program by alternately reading lines and carrying
out commands.
Compiler
Integrated development environment
Interpreter
Translator
Question 9 (1 point)
Listen
Loosely-speaking, computers can only run programs in low-level languages.
True
False
Question 10 (1 point)
Listen
Which of the following is not an example of a high-level programming language?
Assembly
OC++
Java
Python
Question 1 (1 point)
Listen
The Boolean Expression (A && B) && A is true
only when A is true.
O only when B is true.
whenever either A is true or B is true.
only whenever both A is true and B is true.
for all values of A and B.
Question 2 (1 point)
Listen
The Boolean Expression (A && B) && (!A || !B) evaluates to
true is all cases.
false is all cases.
true whenever only A is true or only B is true.
true whenever either A is true or B is true.
true whenever both A is true and B is true.
Question 3 (1 point)
Listen
Identify one correctly written expression in JAVA
Boolean flag = true;
Boolean flag = True;
boolean flag = True;
boolean flag = true;
Question 4 (1 point)
Listen
The following is not an example of a relational operator written according to JAVA
syntax rules
X>y
Oxzy
Oxxy
Ox = = y
Question 5 (1 point)
Listen
Is it a valid JAVA statement? True or False
System.out.println(7 = 7);
True
False
Question 6 (1 point)
Listen
Assume correct is a boolean variable. Which command below will accomplish the
same thing as:
if (x == 5)
correct = true;
else
correct = false;
correct = true;
correct = false;
correct = x;
correct = 5;
correct = (x == 5);
Question 7 (1 point)
Listen
The Boolean Expression (A && B) || (!A || !B) evaluates to
true is all cases.
false is all cases.
true whenever only A is true or only B is true.
true whenever either A is true or B is true. (E) true whenever both A is true and B
is true.
Question 8 (1 point)
Listen
The Boolean Expression (A && B) && !(A && B) evaluates to
true is all cases.
false is all cases.
true whenever only A is true or only B is true.
true whenever either A is true or B is true.
true whenever both A is true and B is true.
Question 9 (1 point)
Listen
The Boolean Expression !(!A) is equivalent to which of the following expressions?
ОА
Ο !Α
false
O true
Question 10 (1 point)
Listen
The Expression A< = B is equivalent to which of the following expressions?
O! (A > B)
)!(B >= A)
O! (A = 5)
System.out.println(“You are hired!”);
nested looping
nested selection
recursion
compound condition
Question 6 (1 point)
Listen
What will be printed?
public class Test5 {
public static void main(String[] args)
{
boolean cleanedRoom = true;
boolean didHomework = false;
if (cleanedRoom && didHomework)
System.out.println(“You can go out”);
else
System.out.println(“No, you can’t go
out”);
}
}
You can go out
No, you can’t go out
You can go out
No, you can’t go out
Nothing is printed
Question 8 (1 point)
Listen
ACME University will accept students who make either at least a 1000 on the SAT,
OR who are in the top 25% of their class. Assume that sat and rank are int variables.
Which of the compound conditions below will correctly check to see if a student is
qualified to go to ACME University?
if (sat > 1000 || rank < 25)
System.out.println("You are accepted");
else
System.out.println("You are not accepted");
if (sat >= 1000 || rank 1000 || rank < 25)
System.out.println("You are accepted");
else
System.out.println("You are not accepted");
if (sat >= 1000 || rank 25)
System.out.println(“You are accepted”);
else
System.out.println(“You are not accepted”);
if (sat >= 1000 && rank