0

Please help me anyone that understands am really lost

Write a Java program that would display the following table Name Student number Cell phone Gender Petrus Hakoya 202003625 0812658321 Male Helvi Jacobs 202001520 0852621532 Female Ketuna Joel 201903256 0812525253 Female Selma Iyambo 202032635 0813636598 Female Question 2 2.1. Using flow charts, write an algorithm that would be used to populate and display the following registration form. [20] Hint: The number of students to be registered is not known and therefore the user should be allowed an opportunity to register unlimited number of students. The user should have two options after each entry, i.e. ask user whether to enter next entry or exit/done. Name Student number Cell phone Gender Course 2.2. Write a java program that would implement the algorithm that you developed in 2.1. above.

9th Sep 2020, 12:22 PM
Memory Tshaawane
Memory Tshaawane - avatar
8 ответов
+ 5
Did you do the Java tutorial?
10th Sep 2020, 10:05 PM
Sonic
Sonic - avatar
+ 2
All this looks relatively easy considering if you have a basic understanding of Java ,if you ain't no one can help you in that case expect you yourself ,assuming you have an understanding you can look out for tutorials using any search engine and implement some basic structure or write and link that code in your description ,there are many generous people in here who would like to help you if you put in your own efforts first ✌️ flow charts have some symbols to design the flow of program ,if you understand it's working well ,you can first write the algorithm like what would happen at next step and then implement it using flow chart
9th Sep 2020, 12:33 PM
Abhay
Abhay - avatar
0
Thank you
9th Sep 2020, 12:36 PM
Memory Tshaawane
Memory Tshaawane - avatar
0
atleast try yourself first, if you are lost somehow then post whatever you have attempted(and share here) and then the community and you can fix it together.
9th Sep 2020, 12:48 PM
minirkk
minirkk - avatar
0
1. import javax.swing.*; public class Students { JFrame jf; Students(){ jf =new JFrame(); String titles[]={"Name","Student number","Cell phone","Gender"}; String input[][]={{"Petrus Hakoya","202003625","0812658321","Male"}, {"Helvi Jacobs"," 202001523 "," 0852621532 ","Female"}, {"Ketuna Joel"," 201903256 "," 0812525253 "," Female "}, {"Selma Iyambo"," 202032635 "," 0813636598 "," Female "}}; JTable jt=new JTable(input,titles); } }
9th Sep 2020, 2:24 PM
Memory Tshaawane
Memory Tshaawane - avatar
0
import static java.rmi.activation.Activatable.register; import java.util.ArrayList; import java.util.Scanner; import java.util.List; public class Array1 { private static void check(int[] arr, int toCheckValue) { boolean test = false; for (int element : arr) { if (element == toCheckValue) { test = true; break; } } // Print the result System.out.println(test); } public static void main(String[] args) { Scanner myObj = new Scanner(System.in); List<Register> student = new ArrayList<>(); // Prompt to user if this is a new student System.out.println("Is this a new entry..? (Y/N)"); String ans = myObj.nextLine(); char answer = 0; do { try (Scanner scanner = new Scanner(System.in)) { System.out.print(" Enter Name => "); String Name = scanner.nextLine(); register.setName(Name); System.out.print(" Enter StudentNo => "); String StudentNo = scanner.nextLine(); register.setStudentNo(StudentNo); System.out.print(" Enter Gender => "); String Gender = scanner.nextLine(); register.setGender(Gender); System.out.print(" Enter Course => "); String Course = scanner.nextLine(); register.setCourse(Course); System.out.print(" Enter Cell => "); long Cell = scanner.nextLong(); register.setCell(Cell); System.out.println(student.toString()); } } while(answer == 'Y'); String N = null; if(ans == null ? N == null : ans.equals(N)){ // Or like this... for(int i = 0; i < student.size(); i++) { System.out.println(student.get(i).getName() + " " + student.get(i).getStudentNo() + " " + student.get(i).getGender() + " " + student.get(i).getCourse() + " " + student.get(i).getCell()); } }
9th Sep 2020, 2:25 PM
Memory Tshaawane
Memory Tshaawane - avatar
0
I tried but i know its wrong
9th Sep 2020, 2:26 PM
Memory Tshaawane
Memory Tshaawane - avatar
0
I TIERED THE ARRAY CODE CAN YOU HELP WERE I WENT WRONG THANK YOU
10th Sep 2020, 8:26 AM
Memory Tshaawane
Memory Tshaawane - avatar