Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming Task Download the zipped project file and import it as with the in-lab exercises: Have the browser open it using the archive manager, click

image text in transcribedimage text in transcribedimage text in transcribed

Programming Task Download the zipped project file and import it as with the in-lab exercises: Have the browser open it using the archive manager, click Extract, navigate to the workspace directory (/home/user/workspace), and click Extract. Launch Eclipse and choose File > Import. Select General > Existing Projects into Workspace, click Next, click Browse..., select the directory called LT1 Sample Starter, and then click "Finish". The starter code you are given has two classes for each question. One is a class that contains a single method. This class is called Q1 or Q2. You need to modify this method to achieve the desired functionality. The second class is a tester class with a main method. Don't modify this class! Run it to see whether your modified code works. Your code needs to be general. That means it needs to work with any input numbers, not just with the given example numbers in the Tester class. Important: Your prompts and other output must match those described here. Marks will be deducted if there are spelling or spacing discrepancies. Feel free to copy and paste from the sample output to your program. Question 1: Write a method that determines whether the integer n has a zero as its last digit. n is an attribute of the class Q1. Return the result as a string according to the below format. Q1Tester needs to produce exactly the below output. Don't modify Q1Tester or any of the parts of Q1 that are given (the class and method declarations)! The number 57 does not have a zero as its last digit. The number 40 has a zero as its last digit. & Q1.java X Q1 Tester.java J Q2.java 1 Z/Name: Priva. Somasale 2 //Student number: 215 750 284 D Q2Tester.java 4 public class Q1 { int n; 000 vous W //Don't modify any code above this line //Your code goes here to determine if n has a zero as its last digit String Zero() { 15 17 } = JQ1.java DQ1Tester.javax J Q2.java D Q2Tester.java //Don't modify this file 4 public class Q1Tester { public static void main(String[] args) { Q1 q1 = new Q1(); GBGBUFEO VOU A WNP, 91.n = 57; System.out.println(q1. Zero()); 'System.out.println( q1.n = 40; System.out.println(q1.Zero())

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Joe Celkos Data And Databases Concepts In Practice

Authors: Joe Celko

1st Edition

1558604324, 978-1558604322

More Books

Students also viewed these Databases questions

Question

Identify five strategies to prevent workplace bullying.

Answered: 1 week ago