If possible please use one advanced programming language (C/C++, Java, C#, etc)
ID: 3906746 • Letter: I
Question
If possible please use one advanced programming language (C/C++, Java, C#, etc) to develop a GUI program to realize all functions and querying above-mentioned. And it will give your additional marks. ..11????4G 12:07 AM 21% - DBDesignTask2018.docx Done 2. Project Description deal with much database to he requirement as follows: There is an administrator who manages student-learning information of the college. The administrator needs to querying about students' information. Of course, is very boring. So he wants to design a Ip him to complete the work efficiently and conveniently. According to his daily works, he lists his 1. The college has some different majors, for example, computer science, software engineering, digital media, network engineering, etc. Each major has several classes and each class has about 30 students. 2. The information about a student involves student ID, name, sex, age, hometown, province, total credits, etc. 3. The information about the course involves course ID, course name, major, credits, etc. One course often has several sections, and one section is taught by one teacher in a semester. The information about the section involves course ID, section ID, semester, year, teaching location, e name, sex, age, title, contact phone, office, email, et student ID, course ID, semester, course marks, etc. 4. The information about the teacher involves teacher ID, c. 5. The information about a student's marks involves 6. Note that: One major has more than one class. One course in a semester needs more than one teacher. And one teacher can take more than one course in a 7. Functions and querying to be done: a) To list one student's marks of all courses grouping semester b) To list all students' marks about some course in the ascending or decreasing order. And each querying c) To compute the average marks of each course. And d) To count the number of courses that one student has e) To query marks of one student about some course; only lists the marks of students in one class; the average marks can be grouped by class; learned, and compute his total credits; f) To query courses that are taught by some teacher in g) To query courses that are taken by some class in h) Other possible functions and querying that you can one semester one semester:Explanation / Answer
import java.sql.*;
class MysqlCon{
public static void main(String args[]){
try{
Class.forName("com.mysql.jdbc.Driver");
Connection con=DriverManager.getConnection(
"jdbc:mysql://localhost:3306/sonoo","root","root");
//here sonoo is database name, root is username and password
Statement stmt=con.createStatement();
ResultSet rs1=stmt.executeQuery("SELECT student_id,course_ID, semester,course_marks FROM Student GROUP BY semester");
while(rs1.next())
System.out.println(rs.getInt(1)+" "+rs.getString(2)+" "+rs.getString(3));
while(rs2.next())
System.out.println(rs.getInt(1)+" "+rs.getString(2)+" "+rs.getString(3));
while(rs3.next())
System.out.println(rs.getInt(1)+" "+rs.getString(2)+" "+rs.getString(3));
ResultSet rs2=stmt.executeQuery("SELECT student_id,course_ID, semester,course_marks FROM Student GROUP BY semester");
ResultSet rs3=stmt.executeQuery("select * from Student ORDER BY course_marks");
ResultSet rs4=stmt.executeQuery("select AVG(course_marks) from Student GROUP BY class");
while(rs4.next())
System.out.println(rs.getInt(1)+" "+rs.getString(2)+" "+rs.getString(3));
ResultSet rs5=stmt.executeQuery("select COUNT(course_ID) , SUM(total_credits) from Student");
while(rs5.next())
System.out.println(rs.getInt(1)+" "+rs.getString(2)+" "+rs.getString(3));
ResultSet rs6=stmt.executeQuery("select course_marks from Student WHERE");
while(rs6.next())
System.out.println(rs.getInt(1)+" "+rs.getString(2)+" "+rs.getString(3));
ResultSet rs7=stmt.executeQuery("select COUNT(course_ID) from Course");
while(rs.next())
System.out.println(rs.getInt(1)+" "+rs.getString(2)+" "+rs.getString(3));
con.close();
}catch(Exception e){ System.out.println(e);}
}
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.