Please help me in creating graphics for this program below. And I would like for you to explain if you can how to put a images in a specific area of the program Program is below import java.util.Scanner;
import java.sql.*; class Student { String studName;
int studNum;
String coursesTaken;
float midtermMarks;
float finalTermMarks;
String teachComments;
float finalAvgWthCreEar; public String getStudName() {
return studName;
} public int getStudNum() {
return studNum;
} public String getCoursesTa
Please help me in creating graphics for this program below. And I would like for you to explain if you can how to put a images in a specific area of the program Program is below import java.util.Scanner; import java.sql.*; class Student { String studName; int studNum; String coursesTaken; float midtermMarks; float finalTermMarks; String teachComments; float finalAvgWthCreEar; public String getStudName() { return studName; } public int getStudNum() { return studNum; } public String getCoursesTa
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Please help me in creating graphics for this program below. And I would like for you to explain if you can how to put a images in a specific area of the program
Program is below
import java.util.Scanner;
import java.sql.*;
class Student {
String studName;
int studNum;
String coursesTaken;
float midtermMarks;
float finalTermMarks;
String teachComments;
float finalAvgWthCreEar;
public String getStudName() {
return studName;
}
public int getStudNum() {
return studNum;
}
public String getCoursesTaken() {
return coursesTaken;
}
public float getMidtermMarks() {
return midtermMarks;
}
public float getFinalTermMarks() {
return finalTermMarks;
}
public String getTeachComments() {
return teachComments;
}
public float getFinalAvgWthCreEar() {
return finalAvgWthCreEar;
}
public void setStudName(String studName) {
this.studName = studName;
}
public void setStudNum(int studNum) {
this.studNum = studNum;
}
public void setCoursesTaken(String coursesTaken) {
this.coursesTaken = coursesTaken;
}
public void setMidtermMarks(float midtermMarks) {
this.midtermMarks = midtermMarks;
}
public void setFinalTermMarks(float finalTermMarks) {
this.finalTermMarks = finalTermMarks;
}
public void setTeachComments(String teachComments) {
this.teachComments = teachComments;
}
public void setFinalAvgWthCreEar(float finalAvgWthCreEar) {
this.finalAvgWthCreEar = finalAvgWthCreEar;
}
}
public class SchoolInformation {
public static void main(String[] args) {
try {
//method calling for getting student details
Student stdObj = getStudentDetails();
//getting the mysql database connection
Class.forName("com.mysql.jdbc.Driver");
//3306 -- replace with your database port number
//test -- replace with your database name
//root -- replace with your database user name
//Root -- replace with your database password
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "root", "Root");
//creating query string for inserting student data
String query = "insert into studentInfo(studName, studNum, coursesTaken, midtermMarks, finalTermMarks, teachComments,"
+ " finalAvgWthCreEar) \r\n"
+ "values(?, ?, ?, ?, ?, ?, ?)";
PreparedStatement preparedStmt = con.prepareStatement(query);
//setting the values to the prepared statement
preparedStmt.setString(1, stdObj.getStudName());
preparedStmt.setInt(2, stdObj.getStudNum());
preparedStmt.setString(3, stdObj.getCoursesTaken());
preparedStmt.setFloat(4, stdObj.getMidtermMarks());
preparedStmt.setFloat(5, stdObj.getFinalTermMarks());
preparedStmt.setString(6, stdObj.getTeachComments());
preparedStmt.setFloat(7, stdObj.getFinalAvgWthCreEar());
//executing the insert query
preparedStmt.execute();
System.out.println("Student Record is inserted successfully");
//closing the connection object
con.close();
} catch (Exception e) {
System.out.println(e.getMessage());
}
}
public static Student getStudentDetails() {
//creating the student object
Student stdObj = new Student();
try {
Scanner sc = new Scanner(System.in);
//reading all the student details and setting values to student object
System.out.print("Please enter student name : ");
String name = sc.nextLine();
stdObj.setStudName(name);
System.out.print("Please enter student number : ");
stdObj.setStudNum(sc.nextInt());
System.out.print("Please enter student course taken : ");
sc.nextLine();
stdObj.setCoursesTaken(sc.nextLine());
System.out.print("Please enter student mid term marks : ");
stdObj.setMidtermMarks(sc.nextFloat());
System.out.print("Please enter student final term marks : ");
stdObj.setFinalTermMarks(sc.nextFloat());
System.out.print("Please enter teacher comments: ");
sc.nextLine();
stdObj.setTeachComments(sc.nextLine());
System.out.print("Please enter student final average with credits earned : ");
stdObj.setFinalAvgWthCreEar(sc.nextFloat());
sc.close();
} catch (Exception e) {
System.out.println("invalid input entered, Please enter proper values");
}
return stdObj;
}
}
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-engineering and related others by exploring similar questions and additional content below.Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY