Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 406145d

Browse files
Add files via upload
1 parent 45e58da commit 406145d

File tree

83 files changed

+1196
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+1196
-0
lines changed

‎JavaDay5/JavaDay5.iml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="JAVA_MODULE" version="4">
3+
<component name="NewModuleRootManager" inherit-compiler-output="true">
4+
<exclude-output />
5+
<content url="file://$MODULE_DIR$">
6+
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
7+
</content>
8+
<orderEntry type="inheritedJdk" />
9+
<orderEntry type="sourceFolder" forTests="false" />
10+
</component>
11+
</module>
1.58 KB
Binary file not shown.
1.49 KB
Binary file not shown.

‎JavaDay5/src/Course.java‎

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
public class Course {
2+
3+
int courseid;
4+
String courseName;
5+
int courseFee;
6+
7+
8+
public Course(){
9+
10+
}
11+
12+
public Course(int courseid,String courseName,int courseFee)
13+
{
14+
this.courseid = courseid;
15+
this.courseName = courseName;
16+
this.courseFee = courseFee;
17+
}
18+
19+
//getter and setter for all the instances
20+
21+
public int getCourseid() {
22+
return courseid;
23+
}
24+
25+
public void setCourseid(int courseid) {
26+
this.courseid = courseid;
27+
}
28+
29+
public String getCourseName() {
30+
return courseName;
31+
}
32+
33+
public void setCourseName(String courseName) {
34+
this.courseName = courseName;
35+
}
36+
37+
38+
public int getCourseFee() {
39+
return courseFee;
40+
}
41+
42+
public void setCourseFee(int courseFee) {
43+
this.courseFee = courseFee;
44+
}
45+
46+
47+
public void displayCourseDetails(){
48+
System.out.println("The Course id is "+" "+this.getCourseid());
49+
System.out.println("The Course Name is "+" "+this.getCourseName());
50+
System.out.println("The Course Fees is "+" "+this.getCourseFee());
51+
}
52+
}

‎JavaDay5/src/CourseMain.java‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import java.util.Scanner;
2+
public class CourseMain {
3+
4+
public CourseMain(){
5+
6+
}
7+
8+
public static void main(String[] args) {
9+
Scanner sc = new Scanner(System.in);
10+
System.out.println("Enter the id Details here");
11+
int n = sc.nextInt();
12+
13+
for(int i = 1; i <= n; i++){
14+
Course c1 = new Course();
15+
System.out.println("Enter Name");
16+
String name = sc.next();
17+
System.out.println("Enter ID");
18+
int id = sc.nextInt();
19+
System.out.println("Enter fees");
20+
int fee = sc.nextInt();
21+
22+
c1.setCourseName(name);
23+
c1.setCourseid(id);
24+
c1.setCourseFee(fee);
25+
26+
new Course(id,name,fee);
27+
System.out.println("Student: "+ i);
28+
c1.displayCourseDetails();
29+
30+
}
31+
}
32+
}

‎Javaday4/Javaday4.iml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="JAVA_MODULE" version="4">
3+
<component name="NewModuleRootManager" inherit-compiler-output="true">
4+
<exclude-output />
5+
<content url="file://$MODULE_DIR$">
6+
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
7+
</content>
8+
<orderEntry type="inheritedJdk" />
9+
<orderEntry type="sourceFolder" forTests="false" />
10+
</component>
11+
</module>
755 Bytes
Binary file not shown.
Binary file not shown.
1.22 KB
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /