these are java program... note that-For Part-(a) is the fill the gaps..and for Part-(b) write the code and give the screenshot of running code ... I need the answer within 25 minutes...it’s very urgent.
a) Read the following program code carefully, and complete the statements underlined (1) to (5) abstract class Person{ private String name; public Person (String n) { name = n; } public (1) String getMajor (); _() { public String (2) return name; } } class Student (3) Person { private (4) public Student (String n, String m) { super (n); major = m; } public String (5) return "major is :" + major; _() { public class TestPerson{ public static void main(String args[]) { Person p = new Student ("tom", "AI engineering"); System.out.println (p. getName()+", "+ p. getMajor ()); } b) Programming problems Evaluate the following expression Until the last item is less than 0. 0001 with do while 1/2!+1/3+1/4+1/5!...... +1/15!.......
these are java program... note that-For Part-(a) is the fill the gaps..and for Part-(b) write the code and give the scr
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am