ASSIGNMENT 4. COMP-202, Summer 2017, All Sections. Due: Friday, June 16 th, 11:59pm
|
|
- Timothy Harrison
- 6 years ago
- Views:
Transcription
1 ASSIGNMENT 4 COMP-202, Summer 2017, All Sections Due: Friday, June 16 th, 11:59pm Please read the entire PDF before starting. You must do this assignment individually. Question 1: 100 points 100 points total It is very important that you follow the directions as closely as possible. The directions, while perhaps tedious, are designed to make it as easy as possible for the TAs to mark the assignments by letting them run your assignment, in some cases through automated tests. While these tests will never be used to determine your entire grade, they speed up the process significantly, which allows the TAs to provide better feedback and not waste time on administrative details. Plus, if the TA is in a good mood while he or she is grading, then that increases the chance of them giving out partial marks. :) Up to 30% can be removed for bad indentation of your code as well as omitting comments, coding structure, or missing files. Marks will be removed as well if the class and method names are not respected. To get full marks, you must: Follow all directions below Make sure that your code compiles Non-compiling code will receive a very low mark Write your name and student name is written as a comment in all.java files you hand in Indent your code properly Name your variables appropriately The purpose of each variable should be obvious from the name Comment your work A comment every line is not needed, but there should be enough comments to fully understand your program 1
2 Part 1 (0 points): Warm-up Do NOT submit this part, as it will not be graded. However, doing these exercises might help you to do the second part of the assignment, which will be graded. If you have difficulties with the questions of Part 1, then we suggest that you consult the TAs during their office hours; they can help you and work with you through the warm-up questions. You are responsible for knowing all of the material in these questions. Warm-up Question 1 (0 points) Write a method firstnprimes that takes as input and integer n and returns an array of integers containing the first n prime numbers. Warm-up Question 2 (0 points) Write a method shiftstring which takes as input a String s an int n, and returns a new string obtained by shifting the characters in s by n positions to the right. For example: shiftstring( banana, 2) returns nabana, shiftstring( banana, 9) returns anaban, and shiftstring( banana, -1) returns ananab (a negative number will produce a shift to left!). Hint: Start by writing a method that shift the characters of a string by a fixed number of positions (say 2). Then generalize the method by letting the number of positions be determined by an input n which is less than the length of the string. And finally, write a method that works for any integer n. Warm-up Question 3 (0 points) Write a function LongestCommonPrefix that takes two input string s and t, and returns the longest common prefix of both strings. For example, if s = ACCTGAACTCCCCCC and t = ACCTAGGACCCCCC, then the longest common prefix is ACCT. Warm-up Question 4 (0 points) Write a class describing a Cat object. A cat has the following attributes: a name (String), a breed (String), an age (int) and a mood (String). The mood of a cat can be one of the following: sleepy, hungry, angry, happy, crazy. The cat constructor takes as input a String and sets that value to be the breed. The Cat class also contains a method called talk(). This method takes no input and returns nothing. Depending on the mood of the cat, it prints something different. If the cat s mood is sleepy, it prints meow. If the mood is hungry, it prints RAWR!. If the cat is angry, it prints hsssss. If the cat is happy it prints purrrr. If the cat is crazy, it prints a String of 10 gibberish characters (e.g. raseagafqa). The cat attributes are all private. Each one has a corresponding public method called getattributename() (ie: getname(), getmood(), etc.) which returns the value of the attribute. All but the breed also have a public method called setattributename() which takes as input a value of the type of the attribute and sets the attribute to that value. Be sure that only valid mood sets are permitted. (ie, a cat s mood can only be one of five things). There is no setbreed() method because the breed of a cat is set at birth and cannot change. Test your class in another file which contains only a main method. Test all methods to make sure they work as expected. Warm-up Question 5 (0 points) Using the Cat type defined in the previous question, create a Cat[] of size 5. Create 5 Cat objects and put them all into the array. Page 2
3 Part 2 The questions in this part of the assignment will be graded. Question 1: Creating Data Types (100 points) DNA is a molecule that carries the genetic instructions used in the growth, development, functioning and reproduction of all known living organisms 1. A genome is an organism s complete set of DNA (or genetic material). Each genome contains all of the information needed to build and maintain that organism, and passing life on to the next generation. Biologists usually abstract away the genome to a sequence of nucleotides (A, C, G, or T) (Each letter represents a small molecule, and a DNA sequence is a macromolecular chain of them.). This sequence is just a succession of letters that indicate the order of nucleotides within a DNA molecule. Then, a DNA sequence that has been translated from life s chemical alphabet into our alphabet of written letters might look like this: (AGTCCGC...). That is, in this particular piece of DNA, an adenine (A) is followed by a guanine (G), which is followed by a thymine (T), which in turn is followed by a cytosine (C), another cytosine (C), and so on. The cost of sequencing a human genome (i.e., the process of figuring out the order of DNA nucleotides in a genome) has fallen from approximately $100 million in 2001 to $1,000 in Scientists are able now to study entire genome sequences to try to understand how the genome as a whole works. Although the sequences of many genomes have been (almost) completely determined, yet much work still needs to be done. One very needed task in the field is the creation of a new Data Type in Java that would be able to store and model the genome in a object-oriented fashion. As a student of COMP202 you have been commissioned to develop this new data type. To be fully functional (and useful for biologists) the new data type should support the following attributes and methods. 1. Create a java class called Genome. This class has three attributes. Two Strings called sequence and species (which store the DNA sequence [a sequence of nucleotides] and the origin species [such as humans, giraffe, monkey etc] of the Genome, respectively). One int called numgenes representing the number of genes present in the Genome. All the attributes must be non-static and private. 2. Generate getter methods for each of the three previously defined attributes. 3. Generate a constructor that get two String parameters: the sequence and species of the Genome. Your constructor must initialize the class attributes. Please make sure that you initialize the Genome sequence only with uppercase letters extracted from the valid alphabet (A, C, G, T). HINT: It is a good idea to declare a method checknucleotide to check if a character belongs to the valid alphabet, you will use it again later. 4. Generate a private method called tostring(). This method must overwrite the default method tostring(). This method should now print information regarding the three attributes (i.e., sequence, species and numgenes). If the number of genes has not been computed for the Genome, you should inform the user that there is no information about the number of genes. 5. Generate a private method called addnucleotide that gets as parameter a char c and an int index. This method should insert the new nucleotide at the position index of the Genome sequence. addnucleotide must throw a RuntimeException if the character c is an illegal nucleotide. 6. Generate a private method called nucleotideat that gets as parameter an int index. This method should return the nucleotide located at the position index in the Genome. nucleotideat should throw a RuntimeException if the Genome is out of bounds 7. Generate a private method called length that returns the number of nucleotides in the Genome. 8. Generate a private method called isvalid. This method receive a String seq as parameter and it validates (returning true) if seq is a valid DNA sequence. A DNA sequence is valid if all the nucleotides belong to the uppercase alphabet (A, C, G, T). 1 Definition extracted from: Page 3
4 9. Generate a private method called checkequality. This method has as a unique parameter Genome obj and it returns true if the two Genomes (i.e., the one received as parameter and the one referenced by this) have the same elements (i.e., The sequences and species are the same). 10. Generate a private method called subsequence. Given two strings s and t (as parameters), write a private function Subsequence that determines whether s is a subsequence of t. That is, the letters of s should appear in the same order in t, but not necessarily contiguously. For example accag is a subsequence of taagcccaaccgg. 11. Generate a private method called isgene which validates if a subsequence (of the DNA Genome) is a gene. A gene is a region of the genome that represents a functional unit of critical importance in understanding life processes. Particularly, a gene is a substring that contains the instructions for making one protein. To perform the creation of proteins, the Genome is conceptually partitioned into units of three consecutive nucleotides, each called a codon. isgene takes a DNA string as an argument and determines whether it corresponds to a potential gene based on the following criteria: It begins with the start codon ATG. Its length is a multiple of 3. It ends with one of the stop codons TAG, TAA, or TGA. It has no intervening stop codons. For example, having as parameter the String ATGCGCCTGCGTCTGTACTAG the method isgene should return true because: i) The length (i.e., 21) is a multiple of three, ii) it starts with the start codon ATG, iii) it ends with the stop codon TAG and iv) There are no intervening stop codons in the substring CGCCTGCGTCTGTAC. 12. Generate a private void method called findgenes which do not receive parameters and calculates the total number of genes in the Genome sequence. Once you compute the total number of genes the method must update the class attribute numgenes with the computed number. HINT: You can use the previously computed isgene method to know if a substring is a gene or not. 13. Generate a private function called iscircularshift that checks whether two strings s and t (given as parameters) are circular shifts of one another. For example, ACTGACG is a circular shift of TGACGAC, and vice versa. Detecting this condition is important in the study of genomic sequences. HINT: Think how can you use the String function contains to solve this problem. 14. Generate a private method called reversecomplemented that returns the reverse complement of the Genome sequence. Normally, DNA occurs as a double strand where each A is paired with a T and vice versa, and each C is paired with a G and vice versa. The reverse complement of a DNA sequence is formed by reversing the letters, interchanging A and T and interchanging C and G. Thus the reverse complement of ACCTGAG is CTCAGGT (please note that the strings are reversed). 15. In DNA sequence analysis, a complemented palindrome is a string equal to its reverse complement. Adenine (A) and Thymine (T) are complements, as are Cytosine (C) and Guanine (G). For example, ACGGT is a complement palindrome. Write a function called longestcomplementedpalindrome that given a String input, finds the longest complemented palindrome that is a substring of the text. For example, if the text is GACACGGTTTTA then the longest complemented palindrome is ACGGT. HINT: consider each letter as the center of a possible palindrome of odd length, then consider each pair of letters as the center of a possible palindrome of even length. What To Submit You have to submit the Genome.java file to mycourses. Do not submit any other files, especially.class files. You can also submit the file called Confession.txt. In this file, you can tell the TA about any issues you ran into doing this assignment. If you point out an error that you know occurs in your problem, it may lead Page 4
5 the TA to give you more partial credit. On the other hand, it also may lead the TA to notice something that otherwise they would not. Page 5
ASSIGNMENT 4. COMP-202C, Summer Due: Monday June 29th, 2015 (23:30)
ASSIGNMENT 4 COMP-202C, Summer 2015 Due: Monday June 29th, 2015 (23:30) Please read the entire pdf before starting. You must do this assignment individually and, unless otherwise specified, you must follow
More informationASSIGNMENT 5. COMP-202, Winter 2015, All Sections. Due: Tuesday, March 31st, 2015 (23:59)
ASSIGNMENT 5 COMP-202, Winter 2015, All Sections Due: Tuesday, March 31st, 2015 (23:59) Please read the entire PDF before starting. You must do this assignment individually and, unless otherwise specified,
More informationASSIGNMENT 4. COMP-202, Fall 2014, All Sections. Due: November 9 th, 2014 (23:59)
ASSIGNMENT 4 COMP-202, Fall 2014, All Sections Due: November 9 th, 2014 (23:59) Please read the entire pdf before starting. You must do this assignment individually and, unless otherwise specified, you
More informationASSIGNMENT 3. COMP-202, Winter 2015, All Sections. Due: Tuesday, February 24, 2015 (23:59)
ASSIGNMENT 3 COMP-202, Winter 2015, All Sections Due: Tuesday, February 24, 2015 (23:59) Please read the entire pdf before starting. You must do this assignment individually and, unless otherwise specified,
More informationASSIGNMENT 4. COMP-202, Fall 2013, All Sections. Due: December 6 th,2013(23:59)
ASSIGNMENT 4 COMP-202, Fall 2013, All Sections Due: December 6 th,2013(23:59) Please read the entire PDF before starting. You must do this assignment individually and, unless otherwise specified, you must
More informationASSIGNMENT 2. COMP-202A, Fall 2013, All Sections. Due: October 20 th, 2013 (23:59)
ASSIGNMENT 2 COMP-202A, Fall 2013, All Sections Due: October 20 th, 2013 (23:59) Please read the entire PDF before starting. You must do this assignment individually and, unless otherwise specified, you
More informationASSIGNMENT 3. COMP-202, Fall 2014, All Sections. Due: October 24 th, 2014 (23:59)
ASSIGNMENT 3 COMP-202, Fall 2014, All Sections Due: October 24 th, 2014 (23:59) Please read the entire pdf before starting. You must do this assignment individually and, unless otherwise specified, you
More informationASSIGNMENT 6. COMP-202, Winter 2015, All Sections. Due: Tuesday, April 14, 2015 (23:59)
ASSIGNMENT 6 COMP-202, Winter 2015, All Sections Due: Tuesday, April 14, 2015 (23:59) Please read the entire pdf before starting. You must do this assignment individually and, unless otherwise specified,
More informationASSIGNMENT 2. COMP-202A, Fall 2011, All Sections. Due: Monday, October 17th, 2011 (23:30)
ASSIGNMENT 2 COMP-202A, Fall 2011, All Sections Due: Monday, October 17th, 2011 (23:30) Please read the entire pdf before starting. The bottom has important instructions for how to test your code before
More informationASSIGNMENT 1 First Java Assignment
ASSIGNMENT 1 First Java Assignment COMP-202B, Winter 2012, All Sections Due: Sunday January 29th, 2012 (23:30) Please read the entire pdf before starting. You must do this assignment individually and,
More informationCounting Product Rule
Counting Product Rule Suppose a procedure can be broken down into a sequence of two tasks. If there are n 1 ways to do the first task and n 2 ways to do the second task, then there are n 1 * n 2 ways to
More informationProgramming Applications. What is Computer Programming?
Programming Applications What is Computer Programming? An algorithm is a series of steps for solving a problem A programming language is a way to express our algorithm to a computer Programming is the
More information: Intro Programming for Scientists and Engineers Assignment 3: Molecular Biology
Assignment 3: Molecular Biology Page 1 600.112: Intro Programming for Scientists and Engineers Assignment 3: Molecular Biology Peter H. Fröhlich phf@cs.jhu.edu Joanne Selinski joanne@cs.jhu.edu Due Dates:
More informationNote: This is a miniassignment and the grading is automated. If you do not submit it correctly, you will receive at most half credit.
Com S 227 Fall 2017 Miniassignment 1 50 points Due Date: Monday, October 16, 11:59 pm (midnight) Late deadline (25% penalty): Tuesday, October 17, 11:59 pm General information This assignment is to be
More informationMapping Reads to Reference Genome
Mapping Reads to Reference Genome DNA carries genetic information DNA is a double helix of two complementary strands formed by four nucleotides (bases): Adenine, Cytosine, Guanine and Thymine 2 of 31 Gene
More information6.00 Introduction to Computer Science and Programming Fall 2008
MIT OpenCourseWare http://ocw.mit.edu 6.00 Introduction to Computer Science and Programming Fall 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
More informationCMPSCI 187 / Spring 2015 Hangman
CMPSCI 187 / Spring 2015 Hangman Due on February 12, 2015, 8:30 a.m. Marc Liberatore and John Ridgway Morrill I N375 Section 01 @ 10:00 Section 02 @ 08:30 1 CMPSCI 187 / Spring 2015 Hangman Contents Overview
More informationASSIGNMENT 1. COMP-202, Fall 2015, All Sections. Due: October 5 th, 2015 (23:59)
ASSIGNMENT 1 COMP-202, Fall 2015, All Sections Due: October 5 th, 2015 (23:59) Please read the entire pdf before starting. You must do this assignment individually and, unless otherwise specified, you
More informationASSIGNMENT 5 Objects, Files, and a Music Player
ASSIGNMENT 5 Objects, Files, and a Music Player COMP-202A, Fall 2009, All Sections Due: Thursday, December 3, 2009 (23:55) You MUST do this assignment individually and, unless otherwise specified, you
More informationCMSC423: Bioinformatic Algorithms, Databases and Tools. Exact string matching: Suffix trees Suffix arrays
CMSC423: Bioinformatic Algorithms, Databases and Tools Exact string matching: Suffix trees Suffix arrays Searching multiple strings Can we search multiple strings at the same time? Would it help if we
More informationECE15: Lab #3. Problem 1. University of California San Diego ( 1) + x4. + x8 + (1)
University of California San Diego ECE15: Lab #3 This lab relates specifically to the material covered in Lecture Units 6 and 7 in class, although it assumes knowledge of the previous Lecture Units as
More informationAssignment3 CS206 Intro to Data Structures Fall Part 1 (50 pts) due: October 13, :59pm Part 2 (150 pts) due: October 20, :59pm
Part 1 (50 pts) due: October 13, 2013 11:59pm Part 2 (150 pts) due: October 20, 2013 11:59pm Important Notes This assignment is to be done on your own. If you need help, see the instructor or TA. Please
More informationAdmin. CS 112 Introduction to Programming. Exercise: Gene Finding. Language Organizing Structure. Gene Finding. Foundational Programming Concepts
Admin CS 112 Introduction to Programming q PS6 (Sukoku) questions? q Planning of remaining of the semester User-Defined Data Types Yang (Richard) Yang Computer Science Department Yale University 308A Watson,
More informationLAB A Translating Data to Binary
LAB A Translating Data to Binary Create a directory for this lab and perform in it the following groups of tasks: LabA1.java 1. Write the Java app LabA1 that takes an int via a command-line argument args[0]
More informationHomework 6: Higher-Order Procedures Due: 10:00 PM, Oct 17, 2017
Integrated Introduction to Computer Science Hughes Homework 6: Higher-Order Procedures Due: 10:00 PM, Oct 17, 2017 Contents 1 Fun with map (Practice) 2 2 Unfold (Practice) 3 3 Map2 3 4 Fold 4 5 All You
More informationAssignment 4. Aggregate Objects, Command-Line Arguments, ArrayLists. COMP-202B, Winter 2011, All Sections. Due: Tuesday, March 22, 2011 (13:00)
Assignment 4 Aggregate Objects, Command-Line Arguments, ArrayLists COMP-202B, Winter 2011, All Sections Due: Tuesday, March 22, 2011 (13:00) You MUST do this assignment individually and, unless otherwise
More information2. [20] Suppose we start declaring a Rectangle class as follows:
1. [8] Create declarations for each of the following. You do not need to provide any constructors or method definitions. (a) The instance variables of a class to hold information on a Minesweeper cell:
More informationDNA Inspired Bi-directional Lempel-Ziv-like Compression Algorithms
DNA Inspired Bi-directional Lempel-Ziv-like Compression Algorithms Attiya Mahmood, Nazia Islam, Dawit Nigatu, and Werner Henkel Jacobs University Bremen Electrical Engineering and Computer Science Bremen,
More informationCIS 121 Data Structures and Algorithms with Java Spring 2018
CIS 121 Data Structures and Algorithms with Java Spring 2018 Homework 6 Compression Due: Monday, March 12, 11:59pm online 2 Required Problems (45 points), Qualitative Questions (10 points), and Style and
More informationGenome 373: Intro to Python II. Doug Fowler
Genome 373: Intro to Python II Doug Fowler Review string objects represent a sequence of characters characters in strings can be gotten by index, e.g. mystr[3] substrings can be extracted by slicing, e.g.
More informationCS 4240: Compilers and Interpreters Project Phase 1: Scanner and Parser Due Date: October 4 th 2015 (11:59 pm) (via T-square)
CS 4240: Compilers and Interpreters Project Phase 1: Scanner and Parser Due Date: October 4 th 2015 (11:59 pm) (via T-square) Introduction This semester, through a project split into 3 phases, we are going
More informationCS 112 Introduction to Programming
A Possible Pitfall With Recursion CS 112 Introduction to Programming Fibonacci numbers. 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, (Spring 2012) #0 if n = 0 % F(n) = 1 if n = 1 % F(n 1) + F(n 2) otherwise & Lecture
More informationASSIGNMENT 4 Classes and Objects
ASSIGNMENT 4 Classes and Objects COMP-202A, Fall 2010, All Sections Due: Friday, November 19, 2010 (23:55) You MUST do this assignment individually and, unless otherwise specified, you MUST follow all
More informationACORN.COM CS 1110 SPRING 2012: ASSIGNMENT A1
ACORN.COM CS 1110 SPRING 2012: ASSIGNMENT A1 Due to CMS by Tuesday, February 14. Social networking has caused a return of the dot-com madness. You want in on the easy money, so you have decided to make
More informationOverview. Dataset: testpos DNA: CCCATGGTCGGGGGGGGGGAGTCCATAACCC Num exons: 2 strand: + RNA (from file): AUGGUCAGUCCAUAA peptide (from file): MVSP*
Overview In this homework, we will write a program that will print the peptide (a string of amino acids) from four pieces of information: A DNA sequence (a string). The strand the gene appears on (a string).
More informationBCH339N Systems Biology/Bioinformatics Spring 2018 Marcotte A Python programming primer
BCH339N Systems Biology/Bioinformatics Spring 2018 Marcotte A Python programming primer Python: named after Monty Python s Flying Circus (designed to be fun to use) Python documentation: http://www.python.org/doc/
More information15.4 Longest common subsequence
15.4 Longest common subsequence Biological applications often need to compare the DNA of two (or more) different organisms A strand of DNA consists of a string of molecules called bases, where the possible
More informationASSIGNMENT 5 Data Structures, Files, Exceptions, and To-Do Lists
ASSIGNMENT 5 Data Structures, Files, Exceptions, and To-Do Lists COMP-202B, Winter 2009, All Sections Due: Tuesday, April 14, 2009 (23:55) You MUST do this assignment individually and, unless otherwise
More informationComputer Science E-119 Fall Problem Set 3. Due before lecture on Wednesday, October 31
Due before lecture on Wednesday, October 31 Getting Started To get the files that you will need for this problem set, log into nice.harvard.edu and enter the following command: gethw 3 This will create
More informationTopics. Java arrays. Definition. Data Structures and Information Systems Part 1: Data Structures. Lecture 3: Arrays (1)
Topics Data Structures and Information Systems Part 1: Data Structures Michele Zito Lecture 3: Arrays (1) Data structure definition: arrays. Java arrays creation access Primitive types and reference types
More informationASSIGNMENT 5 Objects, Files, and More Garage Management
ASSIGNMENT 5 Objects, Files, and More Garage Management COMP-202B, Winter 2010, All Sections Due: Wednesday, April 14, 2009 (23:55) You MUST do this assignment individually and, unless otherwise specified,
More informationDue Friday, March 20 at 11:59 p.m. Write and submit one Java program, Sequence.java, as described on the next page.
CS170 Section 5 HW #3 Due Friday, March 20 at 11:59 p.m. Write and submit one Java program, Sequence.java, as described on the next page. The assignment should be submitted on the Math/CS system (from
More informationAP Computer Science A
2017 AP Computer Science A Sample Student Responses and Scoring Commentary Inside: RR Free Response Question 1 RR Scoring Guideline RR Student Samples RR Scoring Commentary 2017 The College Board. College
More informationData Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi.
Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi Lecture 18 Tries Today we are going to be talking about another data
More informationCSE 142, Autumn 2018 Programming Assignment #9: Critters (20 points) Due Tuesday, December 4th, 9:00 PM
CSE 142, Autumn 2018 Programming Assignment #9: Critters (20 points) Due Tuesday, December 4th, 9:00 PM This assignment focuses on classes and objects. Turn in Ant.java, Bird.java, Hippo.java, Vulture.java,
More informationTips from the experts: How to waste a lot of time on this assignment
Com S 227 Spring 2017 Assignment 1 80 points Due Date: Thursday, February 2, 11:59 pm (midnight) Late deadline (25% penalty): Friday, February 3, 11:59 pm General information This assignment is to be done
More informationRichard Feynman, Lectures on Computation
Chapter 8 Sorting and Sequencing If you keep proving stuff that others have done, getting confidence, increasing the complexities of your solutions for the fun of it then one day you ll turn around and
More informationof Nebraska - Lincoln
University of Nebraska - Lincoln DigitalCommons@University of Nebraska - Lincoln MAT Exam Expository Papers Math in the Middle Institute Partnership 7-2008 De Bruijn Cycles Val Adams University of Nebraska
More information************ THIS PROGRAM IS NOT ELIGIBLE FOR LATE SUBMISSION. ALL SUBMISSIONS MUST BE RECEIVED BY THE DUE DATE/TIME INDICATED ABOVE HERE
Program 10: 40 points: Due Tuesday, May 12, 2015 : 11:59 p.m. ************ THIS PROGRAM IS NOT ELIGIBLE FOR LATE SUBMISSION. ALL SUBMISSIONS MUST BE RECEIVED BY THE DUE DATE/TIME INDICATED ABOVE HERE *************
More informationCS2 Practical 1 CS2A 22/09/2004
CS2 Practical 1 Basic Java Programming The purpose of this practical is to re-enforce your Java programming abilities. The practical is based on material covered in CS1. It consists of ten simple programming
More informationCMPSCI 187: Programming With Data Structures. Review for First Midterm 9 October 2011
CMPSCI 187: Programming With Data Structures Review for First Midterm 9 October 2011 Format Two hours, closed-book, no calculators, computers, etc. Question types as on practice exam: Java Concepts (10
More informationProgramming Languages and Techniques (CIS120)
Programming Languages and Techniques () Lecture 5 January 22, 2018 Datatypes and Trees Announcements Homework 1 due tomorrow at 11:59pm! Homework 2 available soon due Tuesday, January 30 th Read Chapters
More informationCSE 5A Introduction to Programming I (C) Homework 4
CSE 5A Introduction to Programming I (C) Homework 4 Read Chapter 7 Due: Friday, October 26 by 6:00pm All programming assignments must be done INDIVIDUALLY by all members of the class. Start early to ensure
More information2. Take a few minutes to look around the site. The goal is to familiarize yourself with a few key components of the NCBI.
2 Navigating the NCBI Instructions Aim: To become familiar with the resources available at the National Center for Bioinformatics (NCBI) and the search engine Entrez. Instructions: Write the answers to
More informationProgramming Languages and Techniques (CIS120)
Programming Languages and Techniques () Lecture 5 September 10, 2018 Datatypes and Trees Announcements Homework 1 due tomorrow at 11:59pm! Homework 2 available soon due Tuesday, September 18 th Read Chapters
More informationWeb-CAT Guidelines. 1. Logging into Web-CAT
Contents: 1. Logging into Web-CAT 2. Submitting Projects via jgrasp a. Configuring Web-CAT b. Submitting Individual Files (Example: Activity 1) c. Submitting a Project to Web-CAT d. Submitting in Web-CAT
More informationLab 9 - Classes and Objects Directions
Lab 9 - Classes and Objects Directions The labs are marked based on attendance and effort. It is your responsibility to ensure the TA records your progress by the end of the lab. Do each step of the lab
More informationAnnouncements for the Class
Lecture 2 Classes Announcements for the Class Readings Section 1.4, 1.5 in text Section 3.1 in text Optional: PLive CD that comes with text References in text Assignment Assignment 1 due next week Due
More informationHomework 2: Imperative Due: 5:00 PM, Feb 15, 2019
CS18 Integrated Introduction to Computer Science Fisler Homework 2: Imperative Due: 5:00 PM, Feb 15, 2019 Contents 1 Overview of Generic/Parameterized Types 2 2 Double the Fun with Doubly-Linked Lists
More informationWorking with Objects. Overview. This chapter covers. ! Overview! Properties and Fields! Initialization! Constructors! Assignment
4 Working with Objects 41 This chapter covers! Overview! Properties and Fields! Initialization! Constructors! Assignment Overview When you look around yourself, in your office; your city; or even the world,
More informationAssignment 5: Part 1 (COMPLETE) Sprites on a Plane
Assignment 5: Part 1 (COMPLETE) Sprites on a Plane COMP-202B, Winter 2011, All Sections Due: Wednesday, April 6, 2011 (13:00) This assignment comes in TWO parts. Part 2 of the assignment will be published
More informationDecision Problems. Observation: Many polynomial algorithms. Questions: Can we solve all problems in polynomial time? Answer: No, absolutely not.
Decision Problems Observation: Many polynomial algorithms. Questions: Can we solve all problems in polynomial time? Answer: No, absolutely not. Definition: The class of problems that can be solved by polynomial-time
More informationCS61B Lecture #12. Today: Various odds and ends in support of abstraction.
CS61B Lecture #12 Today: Various odds and ends in support of abstraction. Readings: At this point, we have looked at Chapters 1 9 of Head First Java. Today s lecture is about Chapters 9 and 11. For Friday,
More informationAssignment 5: MyString COP3330 Fall 2017
Assignment 5: MyString COP3330 Fall 2017 Due: Wednesday, November 15, 2017 at 11:59 PM Objective This assignment will provide experience in managing dynamic memory allocation inside a class as well as
More informationUniversity of California, Berkeley College of Engineering
University of California, Berkeley College of Engineering Department of Electrical Engineering and Computer Sciences Summer 2016 Instructors: Shreyas Chand, Justin Hsia 2016-07-07 Last Name (Please print
More informationImportant Example: Gene Sequence Matching. Corrigiendum. Central Dogma of Modern Biology. Genetics. How Nucleotides code for Amino Acids
Important Example: Gene Sequence Matching Century of Biology Two views of computer science s relationship to biology: Bioinformatics: computational methods to help discover new biology from lots of data
More informationTips from the experts: How to waste a lot of time on this assignment
Com S 227 Spring 2018 Assignment 1 100 points Due Date: Friday, September 14, 11:59 pm (midnight) Late deadline (25% penalty): Monday, September 17, 11:59 pm General information This assignment is to be
More informationPractice Midterm #2. Midterm Time: Monday, July 18 th, 7pm 9pm Midterm Location: Hewlett 200
Alisha Adam & Rohit Talreja CS 106A Summer 2016 Practice Midterm #2. Midterm Time: Monday, July 18 th, 7pm 9pm Midterm Location: Hewlett 200. Based on previous handouts by Keith Schwarz, Eric Roberts,
More informationHomework 6: Higher-Order Procedures Due: 11:59 PM, Oct 16, 2018
Integrated Introduction to Computer Science Klein Homework 6: Higher-Order Procedures Due: 11:59 PM, Oct 16, 2018 Contents 1 Fun with map (Practice) 2 2 Unfold (Practice) 3 3 Map2 3 4 Fold 4 5 All You
More information& Object-Oriented Programming (POOP) Modified from CS61A Summer 2012 Lecture at UC Berkeley
& Object-Oriented Programming (POOP) Modified from CS61A Summer 2012 Lecture at UC Berkeley Where We Were: Functional Programming Style of programming One of many programming paradigms where functions
More informationME 172. Lecture 2. Data Types and Modifier 3/7/2011. variables scanf() printf() Basic data types are. Modifiers. char int float double
ME 172 Lecture 2 variables scanf() printf() 07/03/2011 ME 172 1 Data Types and Modifier Basic data types are char int float double Modifiers signed unsigned short Long 07/03/2011 ME 172 2 1 Data Types
More informationCS 1110 Prelim 2 November 6th, 2012
CS 1110 Prelim 2 November 6th, 2012 This 90-minute exam has 6 questions worth a total of 100 points. Scan the whole test before starting. Budget your time wisely. Use the back of the pages if you need
More informationAnnouncements. Prelude (2) Prelude (1) Data Structures and Information Systems Part 1: Data Structures. Lecture 6: Lists.
Announcements MODULE WEB-SITE: http://www.csc.liv.ac.uk/ michele/teaching/comp102/comp102.html FIRST ASSIGNMENT DEADLINE: Wednesday, February 1st, 14.30, LAB 7 Boxes (late submissions to be left in the
More information3. Open Vector NTI 9 (note 2) from desktop. A three pane window appears.
SOP: SP043.. Recombinant Plasmid Map Design Vector NTI Materials and Reagents: 1. Dell Dimension XPS T450 Room C210 2. Vector NTI 9 application, on desktop 3. Tuberculist database open in Internet Explorer
More informationComp 11 Lectures. Mike Shah. June 26, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures June 26, / 57
Comp 11 Lectures Mike Shah Tufts University June 26, 2017 Mike Shah (Tufts University) Comp 11 Lectures June 26, 2017 1 / 57 Please do not distribute or host these slides without prior permission. Mike
More informationCS106A Handout 18 Winter February 3, 2014 Practice Midterm Exam
CS106A Handout 18 Winter 2013-2014 February 3, 2014 Practice Midterm Exam This handout is intended to give you practice solving problems that are comparable in format and difficulty to those which will
More informationCSCI 1301: Introduction to Computing and Programming Spring 2019 Lab 10 Classes and Methods
Note: No Brainstorm this week. This lab gives fairly detailed instructions on how to complete the assignment. The purpose is to get more practice with OOP. Introduction This lab introduces you to additional
More information15.4 Longest common subsequence
15.4 Longest common subsequence Biological applications often need to compare the DNA of two (or more) different organisms A strand of DNA consists of a string of molecules called bases, where the possible
More informationChapter 4 Defining Classes I
Chapter 4 Defining Classes I This chapter introduces the idea that students can create their own classes and therefore their own objects. Introduced is the idea of methods and instance variables as the
More informationComputer Science II CSci 1200 Test 2 Overview and Practice
Computer Science II CSci 1200 Test 2 Overview and Practice Overview Test 2 will be held Friday, March 21, 2008 2:00-3:45pm, Darrin 308. No make-ups will be given except for emergency situations, and even
More informationAP Computer Science A
2017 AP Computer Science A Sample Student Responses and Scoring Commentary Inside: RR Free Response Question 3 RR Scoring Guideline RR Student Samples RR Scoring Commentary 2017 The College Board. College
More informationSequence Alignment 1
Sequence Alignment 1 Nucleotide and Base Pairs Purine: A and G Pyrimidine: T and C 2 DNA 3 For this course DNA is double-helical, with two complementary strands. Complementary bases: Adenine (A) - Thymine
More informationProject #2: Linear Feedback Shift Register
BHSEC Queens Object-Oriented Programming Spring 2015 Project #2: Linear Feedback Shift Register Introduction1 A register is a small amount of storage on a digital processor. In this project, we will think
More informationJava How to Program, 10/e. Copyright by Pearson Education, Inc. All Rights Reserved.
Java How to Program, 10/e Education, Inc. All Rights Reserved. Each class you create becomes a new type that can be used to declare variables and create objects. You can declare new classes as needed;
More informationCS100J, Fall 2003 Preparing for Prelim 1: Monday, 29 Sept., 7:30 9:00PM
CS100J, Fall 2003 Preparing for Prelim 1: Monday, 29 Sept., 7:30 9:00PM This handout explains what you have to know for the first prelim. Terms and their meaning Below, we summarize the terms you should
More informationSt. Edmund Preparatory High School Brooklyn, NY
AP Computer Science Mr. A. Pinnavaia Summer Assignment St. Edmund Preparatory High School Name: I know it has been about 7 months since you last thought about programming. It s ok. I wouldn t want to think
More informationData Analytics. Qualification Exam, May 18, am 12noon
CS220 Data Analytics Number assigned to you: Qualification Exam, May 18, 2014 9am 12noon Note: DO NOT write any information related to your name or KAUST student ID. 1. There should be 12 pages including
More information1998 Northeast North America Programming Contest. Problem Number 1: The Return of the Roman Empire
1998 Northeast North America Programming Contest Problem Number 1: The Return of the Roman Empire Write a program that accepts a Roman numeral and converts it to decimal form. Remember, I=1, V=5, X=10,
More informationDesign Patterns: State, Bridge, Visitor
Design Patterns: State, Bridge, Visitor State We ve been talking about bad uses of case statements in programs. What is one example? Another way in which case statements are sometimes used is to implement
More informationInvitation to Computer Science 7th Edition TEST BANK Schneider Gersting
Invitation to Computer Science 7th Edition TEST BANK Schneider Gersting Instant download at: Invitation to Computer Science 7th Edition SOLUTIONS MANUAL Schneider Gersting Instant download at: https://testbankreal.com/download/invitation-computer-science-7th-edition-test-bankschneider-gersting/
More information6.170 Laboratory in Software Engineering Java Style Guide. Overview. Descriptive names. Consistent indentation and spacing. Page 1 of 5.
Page 1 of 5 6.170 Laboratory in Software Engineering Java Style Guide Contents: Overview Descriptive names Consistent indentation and spacing Informative comments Commenting code TODO comments 6.170 Javadocs
More informationAP Computer Science Chapter 10 Implementing and Using Classes Study Guide
AP Computer Science Chapter 10 Implementing and Using Classes Study Guide 1. A class that uses a given class X is called a client of X. 2. Private features of a class can be directly accessed only within
More informationFinding Selection in All the Right Places TA Notes and Key Lab 9
Objectives: Finding Selection in All the Right Places TA Notes and Key Lab 9 1. Use published genome data to look for evidence of selection in individual genes. 2. Understand the need for DNA sequence
More informationCS100B: Prelim 3 Solutions November 16, :30 PM 9:00 PM
CS100B: Prelim 3 Solutions November 16, 1999 7:30 PM 9:00 PM (Print your name) Statement of integrity: I did not break the rules of academic integrity on this exam: (Signature) (Student ID) Sections 10
More informationCS 2630 Computer Organization. Meeting 10/11: data structures in MIPS Brandon Myers University of Iowa
CS 2630 Computer Organization Meeting 10/11: data structures in MIPS Brandon Myers University of Iowa Where we are going Compiler Instruction set architecture (e.g., MIPS) translating source code (C or
More informationCOMP 401 Midterm. Tuesday, Oct 18, pm-3:15pm. Instructions
COMP 401 Midterm Tuesday, Oct 18, 2016 2pm-3:15pm Instructions 1. Please spread out and try and sit in alternate seats. 2. This is a closed book exam. 3. You will not be penalized for errors in Java syntax.
More informationThe design of an ADT should evolve naturally during the problem-solving process Questions to ask when designing an ADT
Designing an ADT The design of an ADT should evolve naturally during the problem-solving process Questions to ask when designing an ADT What data does a problem require? What operations does a problem
More informationTurn in a printout of your code exercises stapled to your answers to the written exercises at 2:10 PM on Thursday, January 13th.
6.189 Homework 3 Readings How To Think Like A Computer Scientist: Monday - chapters 9, 10 (all); Tuesday - Chapters 12, 13, 14 (all). Tuesday s reading will really help you. If you re short on time, skim
More informationEval: A Gene Set Comparison System
Masters Project Report Eval: A Gene Set Comparison System Evan Keibler evan@cse.wustl.edu Table of Contents Table of Contents... - 2 - Chapter 1: Introduction... - 5-1.1 Gene Structure... - 5-1.2 Gene
More informationCSE 142/143 Unofficial Commenting Guide Eric Arendt, Alyssa Harding, Melissa Winstanley
CSE 142/143 Unofficial Commenting Guide Eric Arendt, Alyssa Harding, Melissa Winstanley In Brief: What You Need to Know to Comment Methods in CSE 143 Audience o A random person you don t know who wants
More information