Find Jobs
Hire Freelancers

solve come kinds of java code

$10-30 USD

Opravljeno
Objavljeno pred več kot 5 leti

$10-30 USD

Plačilo ob dostavi
• multiEnqueue(Type els[], int k, int l): requires: None. input: Type els[], int k. results: The first k elements of the array els are added to the queue at its tail one at a time until the queue is full or all k elements are added. The output l is set to the number of elements that have been added. output: l. • multiServe(Type els[], int k, int l): requires: None. input: Type els[], int k. results: The first k elements of the queue are served and stored in els starting at position 0 until the queue is empty or all k elements are served. The output l is set to the number of elements that have been served. output: l. ------------------------------- • multiPush(Type els[], int k, int l): requires: None. input: Type els[], int k. results: The first k elements of the array els are pushed to the stack one at a time until the stack is full or all k elements are added. The output l is set to the number of elements that have been pushed. output: l. • multiPop(Type els[], int k, int l): requires: None. input: Type els[], int k. results: The top k elements of the stack are popped and stored in els starting at position 0 until the stack is empty or all k elements are popped. The output l is set to the number of elements that have been popped. output: l. --------------------------- Write a class called SimpleEncrypt. In this class, you should implement the following static methods: (a) public static Stack<Queue<Character>> readSentences(String fileName): A method that reads sentences from a text file fileName separated by new line and builds a stack of queues, where each sentence is represented by one Queue of characters. The first sentence in the file must be at the top of the stack. The method must catch any exceptions and return null if any. Sample input: ABCDEFGHIJKLMN I love CSC212 The fat cat sat on the mat curiosity killed the cat (b) public static void encrypt(Queue<Character> q, int k): A method that reverses each block of k characters in the sentence represented by q. Assume k ≥ 1. Example 1. Here are two examples: • If q = ABCDEFGHIJKLMN, then by calling encrypt(q, 4), we obtain: DCBAHGFELKJINM. • If q = I love CSC212, then by calling encrypt(q, 4), we obtain: ol IC ev12CS2. Hint: use the new methods added to Queue and Stack. (c) public static void decrypt(Queue<Character> q, int k): A method that decrypts (removes the encryption) the sentence represented by q. Assume k ≥ 1. Example 2. Here are two examples: • If q = DCBAHGFELKJINM, then by calling decrypt(q, 4), we obtain: ABCDEFGHIJKLMN. • If q = ol IC ev12CS2, then by calling decrypt(q, 4), we obtain: I love CSC212. (d) public static void encrypt(Stack<Queue<Character>> st, int k): A method that encrypts all sentences in the stack st. The order of the sentences within the stack must not change. Assume k ≥ 1. (e) public static void decrypt(Stack<Queue<Character>> st, int k): A method that decrypts all sentences in the stack st. The order of the sentences within the stack must not change. Assume k ≥ 1.
ID projekta: 18043503

Več o projektu

8 ponudb
Projekt na daljavo
Aktivno pred 5 leti

Želite zaslužiti?

Prednosti oddajanja ponudb na Freelancerju

Nastavite svoj proračun in časovni okvir
Prejmite plačilo za svoje delo
Povzetek predloga
Registracija in oddajanje ponudb sta brezplačna
Dodeljeno:
Avatar uporabnika
Dear client. I've read your project description carefully and very interested. Feel free to contact me. Waiting your kind reply. Best regards
$15 USD v 1 dnevu
0,0 (0 ocen)
0,0
0,0
8 freelancerjev je oddalo ponudbo s povprečno vrednostjo $29 USD za to delo
Avatar uporabnika
Hello Sir/ Ma’am We are a group of Software Engineers having 10+ years of experience. Expert in JAVA, C, C++ , C# , ANDROID, MATLAB. Done 530+ projects here on FREELANCER.COM. Please check our profile for reference. Thank you
$30 USD v 1 dnevu
4,8 (305 ocen)
7,4
7,4
Avatar uporabnika
hi sir, i will create all the functions of multiple insertsion and encryption etc in java within 2 hours starting right now in 2 hours for 20$, thanks
$20 USD v 1 dnevu
5,0 (335 ocen)
6,7
6,7
Avatar uporabnika
Hello, I can help in writing the Java code. I have 5 years of experience in Java. I can finish your codes by today itself. Let me know if interested. Thanks, AMit
$55 USD v 1 dnevu
5,0 (73 ocen)
5,9
5,9
Avatar uporabnika
Hello Friend, We have 4+ year experience in design and development of Websites and Mobile Applications. We have relevant experience to your requirement. We can do your project. We have expertise in developing Appointment Application, Business Application, E-commerce Applications, Payment gateway integration etc. We have expertise in Design, Java, PHP, Android, iOS, Database etc. Looking forward to hearing from you. Regards Mahavir
$25 USD v 1 dnevu
4,9 (18 ocen)
4,1
4,1

O stranki

Zastava SAUDI ARABIA
Riyadh, Saudi Arabia
0,0
0
Član(ica) od okt. 27, 2018

Verifikacija stranke

Hvala! Po e-pošti smo vam poslali povezavo za prevzem brezplačnega dobropisa.
Pri pošiljanju vašega e-sporočila je šlo nekaj narobe. Poskusite znova.
Registrirani uporabniki Skupaj objavljenih del
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Nalaganje predogleda
Geolociranje je bilo dovoljeno.
Vaša prijavna seja je potekla, zato ste bili odjavljeni. Prosimo, da se znova prijavite.