Please code in Java Programming Language. Each Class must be seperated clearly Class IString: ************************ *

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Please code in Java Programming Language. Each Class must be seperated clearly Class IString: ************************ *

Post by answerhappygod »

Please code in Java Programming Language.
Each Class must be seperated clearly
Please Code In Java Programming Language Each Class Must Be Seperated Clearly Class Istring 1
Please Code In Java Programming Language Each Class Must Be Seperated Clearly Class Istring 1 (98.07 KiB) Viewed 42 times
Please Code In Java Programming Language Each Class Must Be Seperated Clearly Class Istring 2
Please Code In Java Programming Language Each Class Must Be Seperated Clearly Class Istring 2 (75.37 KiB) Viewed 42 times
Class IString:
************************
************************
Main class:
************************
********************
MyString class:
************************
public class MyString implements IString{
@Override public int sum(String string) { ................... }
@Override public String getCode(String string) {
............................................ }
}********************
Question 4: (2 Point) You are given an interface named IString (DO NOT EDIT THIS ONE). Design a class MyString which will implement the interface IString. <<interface>> IString +sum(re:String):int +getCode(re:String):String MyString 1. int sum(rc:String) - used to calculate the summation of all even digits in a given string "rc". 2. String getCode(rc:String) - this function return code of RC as the rule: o Code of RC = all digit characters and uppercase letters in the same order as original given string "rc". No of test case The program output might look something like: Correct output
Question paper (build 07.05.20.19) Zoom E 2. Jening Betoootprenderings RTUNCIONtetan coat oF THE ĐỰ ĐHE THIC o Code of RC = all digit characters and uppercase letters in the same order as original given string "re". The program output might look something like: Correct output No of test case 6 of 6 1 2 Paper No: 6 1. TC 1 test sum() 2. TC= 2 test getCode() Enter TC: 1 Enter a value in a string: 123@123a2 OUTPUT: 6 1. TC 2. TC Enter TC: 2 Enter a value of rc: 1A2haiBc91 OUTPUT: 1A2B91 + 100% 1 test sum() 2 test getCode() Type here to search E 2 ENG I Cose 4:20 PM 8/30/2019 P
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply