Computer Science-QA261

Computer Science-QA261 Online Services

 

Part A: Installing Eclipse
 
1. Download the Java JDK version 1.8 (not the JRE) that is appropriate for your platform.
a. http://www.oracle.com/technetwork/java/javase/downloads/
b. Check the license acceptance box. Then click the appropriate link to download
for your operating system (most likely this is either Mac OSX x64 or Windows
x64)
 

2. Install the Java JDK. Open the file that is downloaded and follow the instructions. This
should install the files in a default location
 

Mac: /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home
Windows: C:\Program Files\Java\jdk1.8.0_121\bin
 

* Windows users should follow these additional steps to add a PATH variable
 

a. Click Start, then Control Panel, then System.
b. Click Advanced, then Environment Variables.
c. Add the location of the bin folder of the JDK installation for the PATH variable in
System Variables. The following is a typical value for the PATH variable
 

C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jdk1.8.0_121\bin
 

3. Run Eclipse for the first time. You will need to create a new workspace. I recommend
creating a CISC181 folder first and then placing the workspace in that folder
 

Mac: /Users/yourname/CISC181/workspace
Windows: C:\CISC181\workspace
 

4. At some point Eclipse may ask you if you want to participate in its data collection effort. I recommend telling it to disable this feature.
 

5. In the first view of your Eclipse workspace it will show you some tutorial related things. I would recommend you follow its tutorial.
 

You can read more about our case study assignment help services here.
 

How it Works

How It works ?

Step 1:- Click on Submit your Assignment here or shown in left side corner of every page and fill the quotation form with all the details. In the comment section, please mention Case Id mentioned in end of every Q&A Page. You can also send us your details through our email id support@assignmentconsultancy.com with Case Id in the email body. Case Id is essential to locate your questions so please mentioned that in your email or submit your quotes form comment section.

Step 2:- While filling submit your quotes form please fill all details like deadline date, expected budget, topic , your comments in addition to Case Id . The date is asked to provide deadline.

Step 3:- Once we received your assignments through submit your quotes form or email, we will review the Questions and notify our price through our email id. Kindly ensure that our email id assignmentconsultancy.help@gmail.com and support@assignmentconcultancy.com must not go into your spam folders. We request you to provide your expected budget as it will help us in negotiating with our experts.

Step 4:- Once you agreed with our price, kindly pay by clicking on Pay Now and please ensure that while entering your credit card details for making payment, it must be done correctly and address should be your credit card billing address. You can also request for invoice to our live chat representatives.

Step 5:- Once we received the payment we will notify through our email and will deliver the Q&A solution through mail as per agreed upon deadline.

Step 6:-You can also call us in our phone no. as given in the top of the home page or chat with our customer service representatives by clicking on chat now given in the bottom right corner.

Case Approach

Scientific Methodology

We use best scientific approach to solve case study as recommended and designed by best professors and experts in the World. The approach followed by our experts are given below:

Defining Problem

The first step in solving any case study analysis is to define its problem carefully. In order to do this step, our experts read the case two three times so as to define problem carefully and accurately. This step acts as a base and help in building the structure in next steps.

Structure Definition

The second step is to define structure to solve the case. Different cases has different requirements and so as the structure. Our experts understand this and follow student;s university guidelines to come out with best structure so that student will receive best mark for the same.

Research and Analysis

This is the most important step which actually defines the strength of any case analysis. In order to provide best case analysis, our experts not only refer case materials but also outside materials if required to come out with best analysis for the case.

Conclusion & Recommendations

A weak conclusion or recommendations spoil the entire case analysis. Our expert know this and always provide good chunks of volume for this part so that instructors will see the effort put by students in arriving at solution so as to provide best mark.

Related Services

 

Part B: Using Eclipse
 

1. Your workspace is divided into individual projects.
 

• To start a new project: File->New->Java Project
• Give the project a name (call it PS0), allow it to use the default options
• Click Finish
 

2. To add a class to the project, push the “New Java Class” button in top tool bar (letter C in
• circle with ‘+’) or File->New->Class
• Type in name of class (call it Transition), use defaults for all other options for now Copy and paste the contents of the Transition.java code on Sakai into your
 

• Transition file.
• Add the Joint library to the build path: right click the project name->select build
• path-> Add Libraries->JUnit->JUnit4-> click Finish and OK
• In Eclipse, run your Transition class example by right-clicking in the file and
• choosing Run As->Java Application. (alternatively there is a green “play” button on the toolbar although it is not exactly the same).
 

Alternatively you could have downloaded the Transition.java file from Sakai directly
into your PS0 project and right-clicked the project in Eclipse and told it to refresh.
 
3. Review the transition guide and versions of transition.py, transition.rkt, and
Transition.java. Make sure you understand each concept and write down any questions
you have about Java syntax and ask them in lecture! The topics in the transition guide
are expected to be familiar to you in your previous language.
 

Part C: Translating Code
 

1. Create a new class in your PS0 project called PS0.
2. Translate the Python/Racket program posted on Sakai (PS0.py or PS0.rkt) into a Java
program.
3. Make sure to add some output to your Java main method that prints the results of calling your methods. Run your program to ensure the output matches your expectations.
 

Part D: Adding JUnit Tests and some additional methods
 

You will now need to add the unit testing framework, JUnit, to your project: Right click
your PS0 project and click Properties (or go to menu Project->Properties). Choose Java
Build Path on the left, and then the Libraries tab on the right. Choose Add Library… then
JUnit, Next, choose version 4 and then Finish.
1. Make your PS0 class extend TestCase (hint: if you type extends TestCase and the press ctrl-space or command-space on a Mac, Eclipse will ask you if you want to import TestCase from the junit.framework package; go ahead and accept Eclipse’s auto-completion). Alternatively, you can type the import statement as in page 7 of the transition.pdf.
 
2. Add two test_ static methods to your PS0, each with 4 assertEquals tests that do the
exact “tests” you have output for in the main method. Note that in Java the double type is imprecise — you must provide a third argument to assertEquals telling it how close the two doubles have to be to pass the test. When you right-click your Java code to run it, choose Run As->JUnit Test.
 
3. Write a new static method that takes in an income amount as a double and returns the smallest int (whole number) such that taking that many exemptions will make the gross income at least 95% of the base income. You may use any of the 3 styles of repetition found on pages 3, 4, and 5 of the transition guide. Here is a sample set of tests:
assertEquals(0, findExemptions(0));
assertEquals(1, findExemptions(10000));
assertEquals(3, findExemptions(20000));
assertEquals(7, findExemptions(50000));
 
4. Credit card numbers follow certain patterns. A credit card number must have between 13 and 16 digits (since leading 0’s are truncated, no card number can be less than 1000000000000). It must also satisfy the Luhn check, which follows this general
algorithm
 

1) Counting from the check digit, which is the rightmost, and moving left, double the
value of every second digit.
2) Sum the digits of the products (e.g., 10: 1 + 0 = 1, 14: 1 + 4 = 5) together with the
undoubled digits from the original number.
3) If the total modulo 10 is equal to 0 (if the total ends in zero) then the number is valid
according to the Luhn formula; else it is not valid.
Here is an example of two credit card numbers, one valid and one invalid:
Account number 7 9 9 2 7 3 9 8 7 1 0 0 3
Double every other 7 18 9 4 7 6 9 16 7 2 0 0 3 Total
Sum of digits 7 9 9 4 7 6 9 7 7 2 0 0 3 =70, valid!
Account number 7 9 9 2 7 3 9 8 7 1 0 0 5
Double every other 7 18 9 4 7 6 9 16 7 2 0 0 5 Total
Sum of digits 7 9 9 4 7 6 9 7 7 2 0 0 5 =72, invalid!
 
In Java, we can use the mod operator, x % 10, to give us the single lowest digit. We can also use whole number division (which truncates any fractional result), x / 10, to “shift” anumber one decimal (base 10) position to the right. You are given the following tests
 

public static void test_sumLuhnDigits() {
assertEquals(0, sumLuhnDigits(0L, false));
assertEquals(4, sumLuhnDigits(21L, true));
assertEquals(72, sumLuhnDigits(7992739871005L, false));
assertEquals(70, sumLuhnDigits(7992739871003L, false));
}
public static void test_luhnCheck() {
assertTrue(luhnCheck(0L));
assertFalse(luhnCheck(21L));
assertFalse(luhnCheck(7992739871005L));
assertTrue(luhnCheck(7992739871003L));
} and the following method signatures to start from:
public static long sumLuhnDigits(long number, boolean odd)
public static booleanluhnCheck(long number)
 

Your implementation of sumLuhnDigits must be recursive — you should not have any loops in your code for this problem.
 
5. Submit your PS0 project (which includes PS0.java and Transition.java) to Sakai as a single archive file (.zip). In Eclipse, click on your project and then choose File->Export, and General->Archive File. In the next dialog your project should already be checked, you just need to specify an archive file to create. Once created, upload this archive file as your submission to Sakai.
 
6. Make sure you can log into the moodle.cis.udel.edu server and see your account for
CISC181. Submit your two functions, sumLuhnDigits and luhnCheck to the PS0 assignment.
For this assignment only we want you to submit code for both the entire project (the .zip file to Sakai) and the individual functions to the moodle server. In future assignments you will only submit one or the other.
 

Grading
 

5 points for submitting a properly exported Eclipse PS0 project to Sakai
5 points for including both PS0.java and Transition.java in the project
10 points for adding two test_ static methods for JUnit tests of the PS0 code
10 points for find Exemptions (awarded on the moodle server)
10 points for sumLuhnDigits (awarded on the moodle server)
10 points for luhnCheck (awarded on the moodle server)
 

 

Looking for best Computer science-QA261 online ,please click here
 

Summary