Skip to content

Commit 041ed05

Browse files
committed
Migrate development environment from Windows to macOS and continue project updates
- Shifted primary development environment from Windows to macOS to ensure better performance, stability, and streamlined workflow for Java development. - Removed OS-specific metadata and ensured platform-agnostic project compatibility. - Normalized line endings to LF for cross-platform consistency. - Verified and adjusted file paths, permissions, and encoding settings to suit macOS environment. - Cleaned up unnecessary Windows-generated files and updated Git configuration accordingly. - Future commits and development will now be managed entirely from macOS. This migration ensures a cleaner, more consistent setup moving forward and prepares the project for scalable development across Unix-based systems. Future development will continue on macOS for a smoother, Unix-based experience. Signed-off-by: Someshdiwan <[email protected]>
1 parent 545b22d commit 041ed05

File tree

3 files changed

+84
-0
lines changed

3 files changed

+84
-0
lines changed

Section10Methods/src/Item.java

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import java.util.Scanner;
2+
3+
class Item
4+
{
5+
public static void main(String[] args)
6+
{
7+
Calculate c = new Calculate();
8+
c.getData();
9+
c.Result();
10+
c.Show();
11+
}
12+
}
13+
14+
class Calculate
15+
{
16+
int p, q, total;
17+
void getData()
18+
{
19+
Scanner sc = new Scanner(System.in);
20+
System.out.println("Enter the price of product:");
21+
p = sc.nextInt();
22+
System.out.println("Enter the quantity of the product:");
23+
q = sc.nextInt();
24+
}
25+
26+
void Result()
27+
{
28+
total = p*q;
29+
}
30+
31+
void Show()
32+
{
33+
System.out.println("Total price is: "+total);
34+
}
35+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
class Test
2+
{
3+
int x, y, res;
4+
void getData(int x, int y)
5+
{
6+
this.x = x; //this is a keyword here
7+
this.y = y;
8+
}
9+
void display()
10+
{
11+
res = x+y;
12+
System.out.println(res);
13+
}
14+
}
15+
16+
class JavKeyword1
17+
{
18+
public static void main(String[] args)
19+
{
20+
Test t = new Test();
21+
t.getData(5,7);
22+
t.display();
23+
}
24+
}

Section10Methods/src/Practice.java

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
class Practice
2+
{
3+
public static void main(String[] args)
4+
{
5+
A a=new A();
6+
a.add(5,7);
7+
a.mul();
8+
}
9+
}
10+
class A
11+
{
12+
int x,y,sum,res;
13+
void add(int x,int y)
14+
{
15+
this.x=x;
16+
this.y=y;
17+
sum=x+y;
18+
System.out.println(sum);
19+
}
20+
void mul()
21+
{
22+
res=x*y;
23+
System.out.println(res);
24+
}
25+
}

0 commit comments

Comments
 (0)