Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is in java programming. And please include method name for each method (a-e). Thank you! . The following exercise assesses your ability to do

image text in transcribedimage text in transcribedThis is in java programming. And please include method name for each method (a-e). Thank you!

. The following exercise assesses your ability to do the following: Utilize abstraction to deconstruct a complex problem into individual tasks. Utilize methods in a programming solution Define methods using appropriate Java syntax 1. Read this document carefully and review the rubric for this assignment before beginning work. Be sure you are familiar with the criteria for successful completion. The rubric link can be found in the digital classroom under the assignment. 2. In this assignment you are designing the following methods by creating flowcharts and writing the method signature. You are not writing code for this assignment. a. A method that takes a String and returns true if the String has 13 digits and false otherwise. a("123456789012") false a("1234567890123") true b. A method that takes a String of 13 digits creates and returns an array of ints with 13 positions. The array should contain the integer equivalents of the digits in the original string. b("1234567890123") arr{1,2,3,4,5,6,7,8,9,0,1,2,3} b("9781623363581") arr{9,7,8,1,6,2,3,3,6,3,5,8,1} c. A method that takes an array of 13 ints and returns an array of 13 ints that is computed as follows: i. Digits at even index locations in the original array are copied directly to the return array at corresponding positions ii. Digits at odd index locations in the original array are multiplied by 3 and copied to the return array at corresponding positions. c(arr{1,2,3,4,5,6,7,8,9,0,1,2,3}) arr{1,6,3,12,5,18,7,24,9,0,3,2,3} c(arr{9,7,8,1,6,2,3,3,6,3,5,8,1}) arr{9,21,8,3,6,6,3,9,6,9,5,24,1} d. A method that takes an array of 13 ints and calculates and returns the sum of the first 12 ints in the array d({1,6,3,12,5,18,7,24,9,0,3,2,3}) 90 d({9,21,8,3,6,6,3,9,6,9,5,24,1}) 109 e. A method that takes the sum calculated in part d and the last value in the integer array and returns i. True if the sum and the last integer are both 0 ii. True if (10 (sum%10)) is equal to the last integer iii. False otherwise e(90,3) ->false e(109,1) =true f. Create a flowchart for a solution that: i. reads in strings of digits from a file ii. calls the methods you've designed to determine whether or not each string of digits has the desired property iii. outputs each string of digits that satisfies the property, one per line

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

Beginning VB.NET Databases

Authors: Thearon Willis

1st Edition

1594864217, 978-1594864216

More Books

Students also viewed these Databases questions